Reputation: 32929
I'm using the jQuery ui slider, set up as follows:
$("#unicornSlider").slider({
range: true,
min: 0,
max: 500,
values: [0, 500]
});
It works pretty well, but the range is set by default to every natural number - so when sliding I get values such as 61-403.
Anyone know how to set it so the values increase in multiples of 10, say? So values such as 60-400? This would work a lot better for a price slider.
Thanks.
Upvotes: 0
Views: 448
Reputation: 13640
use the step property:
http://jqueryui.com/demos/slider/#option-step
$("#unicornSlider").slider({
range: true,
min: 0,
max: 500,
step: 10,
values: [0, 500]
});
Upvotes: 0
Reputation: 33865
It sounds like you are looking for the step option:
$("#unicornSlider").slider({
range: true,
min: 0,
max: 500,
values: [0, 500],
step: 10
});
Upvotes: 1
Reputation: 11211
Use the step
option. http://jqueryui.com/demos/slider/#option-step
Upvotes: 0