I have a series of AJAX calls via jQuery. When an ajax call is being performed, there is no visual indication. Normally if you click a link or otherwise some non-ajax load the browser displays a little loading icon up in the tab.
Is there any way to tell the browser to display this little icon in the tab? (There are about 30 of these calls so I hope to avoid modifying each one).
No, you can't tell the browser such a thing.
But you can do your own loading indicator. Include a hidden element in your markup, then use the ajaxStart
and ajaxStop
events to control its visibility:
$("#loading_animation").bind({
ajaxStart: function() { $(this).show(); },
ajaxStop: function() { $(this).hide(); }
});
ajaxStart
is fired by jQuery when an ajax request is started when none others are running; ajaxStop
is fired when an ajax request completes are there are no others running.
No.
But you can modify the css of the cursor.
body {
cursor:wait;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With