Created
February 27, 2012 22:59
-
-
Save JDMcKinstry/1927741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
if ( !$.cursorWait ) { | |
$.extend({ | |
cursorWait: function(bool_value) { // this boolean value can now be set to gives us more functionality to this call | |
switch (bool_value) { | |
case true: // if set to true then we do want it to make waiting icon | |
document.body.style.cursor = 'wait'; | |
break; | |
case false: // if set to false then we want it to have default style | |
document.body.style.cursor = 'default'; | |
break; | |
default: // despite the name of this case, we are going on relation to the function name, thus this will be the same as case true | |
document.body.style.cursor = 'wait'; | |
}; | |
} | |
}); | |
}; | |
})(jQuery); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment