/ * show the message that data is being loaded every time ajax is called * /
var loadingMessage = 'Please wait loading data for ' + defaultUserName; $(document).ready(function() { $("#Loadstatus").bind("ajaxSend", function() { $(this).text(loadingMessage); $(this).show(); }).bind("ajaxComplete", function() { $(this).hide(); }); });
And, if you want to put a background image in an element using your CSS, you can - an animated gif is shared.
source share