In prototype, I can find out how many AJAX requests have been made to the server but no response has yet been received by looking at:
Ajax.activeRequestCount Is there a similar feature in jQuery? I realise I could make something myself by listening for the Ajax beforeSend and complete events, but it feels like there should be a simpler way. Ideally, I'm looking to be able to execute some code and find out if any ajax requests are outstanding without needing to set anything up before the call. I'm doing this so my testing framework can tell if the page is fully loaded - I don't really want to have to inject code into my application and potentially change its behaviour if I can avoid it. Alun Harford