[jquery] jQuery.active function

I was trying to find some more information on the following jQuery function:

jQuery.active

It is described to test the number of active connections to a server and will evaluate true when the number of connections is zero.

I could not find any information about this function on the jQuery site and was wondering if anyone knew where I could.

This question is related to jquery

The answer is


For anyone trying to use jQuery.active with JSONP requests (like I was) you'll need enable it with this:

jQuery.ajaxPrefilter(function( options ) {
    options.global = true;
});

Keep in mind that you'll need a timeout on your JSONP request to catch failures.