Skip to content
Permalink
Browse files

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 8c8f685a911c811e9b998958dd453a6a2b9d5940
Showing with 1 addition and 3 deletions.
  1. +1 −3 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" );
}

0 comments on commit 8c8f685

Please sign in to comment.
You can’t perform that action at this time.