I am using a ionRangeSlider for price range:
HTML
<input class="range-slider" id="price_range">
JS
$("#price_range").ionRangeSlider({
min: 0,
max: 10000,
type: "double",
grid: false,
step: 500,
force_edges: true,
decorate_both: false,
prettify_enabled: true,
onChange: function (data) {
$('#loading').show();
window.location.replace("@Url");
},
});
I want to add a delay of 2 seconds on onChange
before redirecting to the url.
I have looked into the documentation but I can't find how to add a delay to the onChange
event.
Any help would be appreciated