Reputation: 5784
I am trying to add For steps and Value to jQuery UI Slider at This Demo to be look like this image
so I have 4 steps and he slider handler ONLY sits on one of those values(Not Between) I already tried this methis form jQuery UI documentation
$( "#slider" ).slider({ step: 4 });
var step = $( "#slider" ).slider( "option", "step" );
$( "#slider" ).slider( "option", "step", 4 );
but it didn't work I also tried
$(function() {
$( "#slider" ).slider({ range: "min",
min: 1000,
max: 7000,
value: 1000});
});
again no success! can you please let me know how I can achieve this? Thanks
Upvotes: 1
Views: 430
Reputation: 207881
Your step option setting should be the difference between values, not the number of steps:
$(function () {
$("#slider").slider({
range: "min",
min: 1000,
max: 7000,
value: 1000,
step:2000
});
});
Upvotes: 2