As of jQuery 1.8, the .ajaxStart() method should only be attached to document.
I have two different forms on my page, both which I want to submit using ajax, and display a 'sending' while it's happening. I want #contact_response to display a message when the #contact_form is submitted like so:
$(document).ajaxStart(function() {
$("#contact_response").html("Sending...");
});
And similarly, #booking_response to display a message when #booking_form is submitted. However, doing this causes the other element to display Sending.... If you're only meant to attach ajaxStart() to the document, how are you meant to send multiple responses, but only update certain sections?
Is this the wrong function to use?