Everything seems to be running smoothly on Mozilla (version 103.0), but unfortunately, it's not performing as expected on Chrome or Microsoft Edge.
$('#loading').bind('ajaxStart', function () {
$(this).show();
}).bind('ajaxStop', function () {
$(this).hide();
});
Upon checking the console, an interesting Notice is displayed:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user’s experience.