0

I want to control jquery UI slider using JavaScript. I want to move slider to certain position when a event is triggered.

    $('select#dn_event_date, select#up_event_date').selectToUISlider(

            {
                    // labels and tooltipSrc are selectToUISlider specific options
                    labels: 0                       
                    sliderOptions: {                        
                        // swapped out stop for change here
                    change: function(){
                            // Here i want to control to move slider to certain position                        
                            }
                      }
                }

        );

How can i do that?

Manivasagan
  • 212
  • 1
  • 6
  • 17

1 Answers1

0

you just need to use the value() function

for example let's say you have button and when the user click it you need to move the slider about 60% from the start:

$('#btnRun').click(function(){
    $(".selector").slider("value",60);
});

check this for more information.

ebram khalil
  • 8,252
  • 7
  • 42
  • 60