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();
});
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();
});
Permanent link to this article: http://www.lukemacneil.com/2010/04/26/ajax-waiting-indicator/
Recent Comments