Skip to content

Instantly share code, notes, and snippets.

@chasingmaxwell
Created July 16, 2014 18:05
Show Gist options
  • Save chasingmaxwell/613d295389ae556fb066 to your computer and use it in GitHub Desktop.
Save chasingmaxwell/613d295389ae556fb066 to your computer and use it in GitHub Desktop.
Determine whether there is an ajax request in progress managed by Drupal.ajax
(function(){
// Determine if any ajax call is currently in progress.
Drupal.ajaxInProgress = function() {
for (var id in Drupal.ajax) {
if (Drupal.ajax[id].ajaxing === true) {
return true;
}
}
return false;
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment