I am using jQuery slider.Is it possible to set a value for slide basing on its position.
Ex:
min (1 2 3 4 5 ) Max
value('100' '150' '200' '400' '500')
if the slider is at position 3, it should show the value 200 in the label.
Thank you.
I am using jQuery slider.Is it possible to set a value for slide basing on its position.
Ex:
min (1 2 3 4 5 ) Max
value('100' '150' '200' '400' '500')
if the slider is at position 3, it should show the value 200 in the label.
Thank you.
it is jquery ui
$("#sliderId").slider({
range: "min",
value: 150,
min: 1,
step:100,
max: 500,
slide: function( event, ui ) {
if(ui.value == 1)
$("#textBoxId").val( 100 );
else if(ui.value == 2)
$("#textBoxId").val( 150 );
else if(ui.value == 3)
$("#textBoxId").val( 200 );
else if(ui.value == 4)
$("#textBoxId").val( 300 );
else if(ui.value == 5)
$("#textBoxId").val( 4100 );
}
});