]> source.dussan.org Git - jquery.git/commitdiff
We don't want to increment the Ajax counter if there isn't a global event.
authorjeresig <jeresig@gmail.com>
Tue, 2 Mar 2010 00:31:13 +0000 (19:31 -0500)
committerjeresig <jeresig@gmail.com>
Tue, 2 Mar 2010 00:31:13 +0000 (19:31 -0500)
src/ajax.js

index c5191ef6e8cc52d4541931b19666271db389b8f0..bf11a531dab8ebb4ffe8163c904058ccf5f0de9b 100644 (file)
@@ -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" );
                }