Skip to content

Instantly share code, notes, and snippets.

@bluescreen303
Created April 8, 2013 08:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bluescreen303/5335310 to your computer and use it in GitHub Desktop.
Save bluescreen303/5335310 to your computer and use it in GitHub Desktop.
!function() {
var count = 0;
$(document).ajaxSend(function() { count++; report(); });
$(document).ajaxComplete(function() { count--; report(); });
function report() { if (count > 1) { console.warn('' + count + ' simultaneous ajax calls!'); }}
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment