I used ajaxStart
and ajaxStop
to show and hide loading by this way:
$(document).ajaxStart(function () {
$.LoadingOverlay("show", {
fade:[100,100]
});
});
$(document).ajaxStop(function () {
$.LoadingOverlay("hide", {
fade: [100, 100]
});
});
this code works. but sometimes ajaxStop
function did not triggered, and you have to press F5 key to reload page. because showing loading from ajax start did not hide.
I can't find the problem.
my jQuery
version is 2.2.4.
Updated
I used ajaxComplete
Instead of ajaxStop
but, there was the same problem.
$(document).ajaxStart(function () {
$.LoadingOverlay("show", {
fade:[100,100]
});
});
$(document).ajaxComplete(function () {
$.LoadingOverlay("hide", {
fade: [100, 100]
});
});
Is there anything else, that would be useful?