-5

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.

PSR
  • 39,804
  • 41
  • 111
  • 151
user2412230
  • 63
  • 2
  • 9

1 Answers1

0

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 );
                }
    });
PSR
  • 39,804
  • 41
  • 111
  • 151