I am using this library : https://github.com/seiyria/bootstrap-slider
I have my slider:
<input id="months" data-slider-id='monthsSlider' type="text" data-slider-min="5" data-slider-max="10" data-slider-step="1" data-slider-value="5" data-slider-handle="square" />
How can I detect when user clicks on slider handle and move it?
Here are the Events
.
Events
slide
This event fires when the slider is draggedslideStart
This event fires when dragging startslideStop This event fires when the dragging stops or has been clicked on
change
This event fires when the slider value has changedslideEnabled
This event fires when the slider is enabledslideDisabled
This event fires when the slider is disabled
so, you can use:-
$('#months').on('slide', function(slideEvt) {
var newValue = slideEvt.value;
});