JQuery UI slider, error setting values
I have 3 div's
<div id="slider-range1" class="slider-range"></div>
<div id="slider-range2" class="slider-range"></div>
<div id="slider-range3" class="slider-range"></div>
I added a slider to this div using the class link
$(function() {
$(".slider-range").slider({
range: true,
min: 0,
max: 100,
slide: function(event, ui) {
}
});
});
the ranges of each slider are different. I want to add dynamically
I tried
$("#slider-range1").slider('option','values',[1, 100]);
but it does not work :(
+3
2 answers
$('#slider-range').slider('option', 'min', 1);
$('#slider-range').slider('option', 'max', 100);
Updated in accordance with the comment on this comment:
Actually, in your question there is naswer :)
http://jqueryui.com/demos/slider/#option-range
$("#slider-range").slider({
range: true,
min: 0,
max: 500,
values: [75, 300],
});
+1