Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created September 29, 2010 03:27
Show Gist options
  • Select an option

  • Save rwaldron/602251 to your computer and use it in GitHub Desktop.

Select an option

Save rwaldron/602251 to your computer and use it in GitHub Desktop.
$(document)
.ajaxSend(function (event, xhr, aOpts) {
$('<div/>', {
id: 'loading-indicator',
text: 'Working...',
css: {
position: 'fixed',
top: '0',
left: '0'
}
}).prependTo('body');
})
.ajaxComplete(function() {
$('#loading-indicator').remove();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment