One part of @gaurav solution worked for jQuery 2.1.3 and JQuery UI 1.10.2 with multiple sliders. My project is using four range sliders to filter data with this filter.js plugin. Other solutions were resetting the slider handles back to their starting end points just fine, but apparently they were not firing an event that filter.js understood. So here's how I looped through the sliders:
$("yourSliderSelection").each (function () {
var hs = $(this);
var options = $(this).slider('option');
//reset the ui
$(this).slider( 'values', [ options.min, options.max ] );
//refresh/trigger event so that filter.js can reset handling the data
hs.slider('option', 'slide').call(
hs,
null,
{
handle: $('.ui-slider-handle', hs),
values: [options.min, options.max]
}
);
});
The hs.slider()
code resets the data, but not the UI in my scenario. Hope this helps others.