Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Setting up a spinner for every AJAX call, globally
// One solution might be to have an AJAX spinner in a standard location that gets shown when AJAX requests start and hidden when AJAX requests complete. To do this globally in jQuery:
beforeSend: function(xhr) {
// runs after AJAX requests complete, successfully or not
complete: function(xhr, status){
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.