views:

22

answers:

1

I'm having a bit of trouble using the slider in the jQuery UI API.

I'm using a slider that has two handles, and I want to change them both manually. I would go about doing this in two steps, one for each handle;

$('#slider-range').slider('values', 0, 1000);
$('#slider-range').slider('values', 1, 2000);

The problem with this is that each function calls the change event in the slider. Is there a way to do this with only one function call? What annoys me the most is that I think I did it before, but that same code isn't doing it now. It's actually not doing anything.

$('#slider-range').slider('option', 'values', [1000, 2000]);

_L

A: 

Your code is according to the jQuery docs

 $( ".selector" ).slider( "option", "values", [1,5,9] );

so I guess this is just due to jQuery being a crappy foundation to build on top..

Sean Kinsey
But why three values in that array? I can't get my head around it, and it doesn't seem to work either.
ptrn
that was just copied from the jQuery docs
Sean Kinsey