I\'m using Bootstrap Slider, and I was wondering if there is any way to include a handler for a value change. I see that the documentation includes handlers for slideStart,
You can do the following steps:
1) Use slideStart event to get the original value of your slider
2) Use slideStop event to get the new value of your slider
3) Compare this two value, if it's different then fire your code
var originalVal;
$('.span2').slider().on('slideStart', function(ev){
originalVal = $('.span2').data('slider').getValue();
});
$('.span2').slider().on('slideStop', function(ev){
var newVal = $('.span2').data('slider').getValue();
if(originalVal != newVal) {
alert('Value Changed!');
}
});
Fiddle Demo