This code is working perfectly on mozila(103.0) but, it is not working on chrome or microsoft edge.
$('#loading').bind('ajaxStart', function () {
$(this).show();
}).bind('ajaxStop', function () {
$(this).hide();
});
on console it gives Notice :
Synchronous XMLHttpRequest on the main thread is deprecated because of
its detrimental effects to the end user’s experience.
2
Answers
I would say that you might forgot to wait for document being ready:
As
.bind()
method is deprecated. You can use.on()
method instead.