Skip to content

Instantly share code, notes, and snippets.

@leonbarrett
Created November 9, 2010 14:12
Show Gist options
  • Select an option

  • Save leonbarrett/669117 to your computer and use it in GitHub Desktop.

Select an option

Save leonbarrett/669117 to your computer and use it in GitHub Desktop.
Simple function to show when ajax calls are started/stopped
$(document).ajaxStart(function() {
//you can do anything here such as showing a loading graphic
console.log('ajax started');
});
$(document).ajaxStop(function() {
console.log('ajax stopped');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment