From: jeresig Date: Tue, 2 Mar 2010 00:31:13 +0000 (-0500) Subject: We don't want to increment the Ajax counter if there isn't a global event. X-Git-Tag: 1.4.3rc1~188 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8c8f685a911c811e9b998958dd453a6a2b9d5940;p=jquery.git We don't want to increment the Ajax counter if there isn't a global event. --- diff --git a/src/ajax.js b/src/ajax.js index c5191ef6e..bf11a531d 100644 --- a/src/ajax.js +++ b/src/ajax.js @@ -278,10 +278,8 @@ jQuery.extend({ s.url += (rquery.test(s.url) ? "&" : "?") + s.data; } - jQuery.active++; - // Watch for a new set of requests - if ( s.global && jQuery.active === 1 ) { + if ( s.global && jQuery.active++ === 0 ) { jQuery.event.trigger( "ajaxStart" ); }