I set the global ajaxSend
callback as below in my $(document).ready
function.
// global AJAX methods
$(document).ajaxSend(function(e, xhr, settings) {
alert('here');
});
However, I am never getting here even though I have several $.ajax()
calls that run successfully after the document has loaded and on demand. Yet, here appears when I calling $.post
.
Do global methods not call for $.ajax
requests? I have not modified the global
param, so they should.
I am fine using the beforeSend
, but I need access to the url and other request data.
Any ideas would be appreciated as I have yet to find any gotchas from the docs.