Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
We don't want to increment the Ajax counter if there isn't a global e…
…vent.
  • Loading branch information
jeresig committed Mar 2, 2010
1 parent a4043cd commit 8c8f685
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/ajax.js
Expand Up @@ -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" );
}

Expand Down

0 comments on commit 8c8f685

Please sign in to comment.