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
Maybe you can try something like this -
This change gets triggered whenever a new value is selected from the drop-down, but the alert will come after 2 seconds only.
Try this and let me know if you're looking for something else.