AJAX waiting indicator

| April 26, 2010 | Reply

The following code snippet will display a waiting indicator during any AJAX request.

//Adds a wait indicator to any ajax requests
$(‘body’).ajaxStart(function() {
$(‘#loading’).show();
});
$(‘body’).ajaxStop(function() {
$(‘#loading’).hide();
});

Tags: , , ,

Category: Uncategorized

About the Author ()