Trying to create a slider that will slide back to the beginning if it isn’t dragged all the way across… here is what doesn’t work:
$("#slider").slider({
animate: true,
change: function(event, ui) {
if ($(this).slider('value') < 100) {
$(this).slider('value', 0);
}
}
});
The slider moves back, but instantly, no animation.
In jquery ui 1.8.18 you will have to call it asynchronously: