Created
November 19, 2010 03:03
-
-
Save sdkester/706072 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// prepare the form when the DOM is ready | |
$(document).ready(function() { | |
// Setup the ajax indicator | |
$('body').append('<div id="ajaxBusy"><p><img src="images/loading.gif"></p></div>'); | |
$('#ajaxBusy').css({ | |
display:"none", | |
margin:"0px", | |
paddingLeft:"0px", | |
paddingRight:"0px", | |
paddingTop:"0px", | |
paddingBottom:"0px", | |
position:"absolute", | |
right:"3px", | |
top:"3px", | |
width:"auto" | |
}); | |
}); | |
// Ajax activity indicator bound to ajax start/stop document events | |
$(document).ajaxStart(function(){ | |
$('#ajaxBusy').show(); | |
}).ajaxStop(function(){ | |
$('#ajaxBusy').hide(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
great!