Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jquery - Show progress cursor when browser is busy/loading (windows like)

Tags:

jquery

I want to show the cursor as progress on every load.

Is it possible to show the cursor as progress when the browser is busy?

If not, is it possible to show the cursor as progress if jQuery is posting without adding code to every jQuery post function?

I'm looking for a clean and global solution.

like image 269
Peter Avatar asked Sep 03 '10 08:09

Peter


1 Answers

try:

$().ajaxStart(function(){
   $('body').css('cursor', 'wait');
});

$().ajaxStop(function(){
   $('body').css('cursor', 'auto');
});

and it will invoked when an ajax process called...

like image 183
Vaibhav Gupta Avatar answered Nov 14 '22 22:11

Vaibhav Gupta