When i go to websites such as 9gag or YouTube, open console(I’ve included jQuery source in my console) and enter the jQuery command:
$(document).ajaxStart(function() {
alert('ajax');
});
I get nothing, even when i’m sure ajax is getting triggered when 9gag reaches the end of the page and loads new content, or when new comments are loaded on YouTube page ..
$.ajaxStartis a type of a jQuery Ajax Event. They are implemented on the$.ajaxfunction and are trigged from within there. See the relevant source line on GitHub.So,
$.ajaxStartwill be only triggered for events that are fired with the jQuery implementation of$.ajaxor it’s derived implementations like$.getetc.