Skip to content

Instantly share code, notes, and snippets.

@matharchod
Created October 19, 2011 23:26
Show Gist options
  • Save matharchod/1299985 to your computer and use it in GitHub Desktop.
Save matharchod/1299985 to your computer and use it in GitHub Desktop.
A jQuery function that creates a "busy" message for 10 seconds by switching CSS classes on multiple elements simultaneously.
//BUSY MESSAGE
function busy() {
var x = $('#header a, #portfolio a');//ALL ELEMENTS TO BE AFFECTED
$(x).addClass('busy');
setTimeout(function(){
$(x).removeClass('busy').addClass('ready');
}, 10000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment