jQuery UI, setting two handles calling only one function
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-开发者_Python百科range').slider('option', 'values', [1000, 2000]);
_L
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..
精彩评论