We don't want to increment the Ajax counter if there isn't a global event.

This commit is contained in:
jeresig 2010-03-01 19:31:13 -05:00
parent a4043cdcbf
commit 8c8f685a91

View file

@ -278,10 +278,8 @@ jQuery.extend({
s.url += (rquery.test(s.url) ? "&" : "?") + s.data; s.url += (rquery.test(s.url) ? "&" : "?") + s.data;
} }
jQuery.active++;
// Watch for a new set of requests // Watch for a new set of requests
if ( s.global && jQuery.active === 1 ) { if ( s.global && jQuery.active++ === 0 ) {
jQuery.event.trigger( "ajaxStart" ); jQuery.event.trigger( "ajaxStart" );
} }