I have this at the top of my jQuery script:
$().ajaxStart(function() {
alert('ok');
});
But the alert is not firing. All th开发者_运维问答e other ajax is working, so I'm not sure why this isn't.
Try calling ajaxStart on document:
$(document).ajaxStart(function() {
alert('ok');
});
$().ajaxStart
worked before jQuery 1.4 but no more.
Please try this:
$(document).ajaxStart(function(){alert("aa");});
HTH
精彩评论