I use this jQuery code to set the mouse pointer to its busy state (hourglass) during an Ajax call...
$('body').css('cursor', 'wait');
and this corresponding code to set it back to normal...
$('body').css('cursor', 'auto');
This works fine... on some browsers.
On Firefox and IE, as soon as I execute the command, the mouse cursor changes. This is the behavior I want.
On Chrome and Safari, the mouse cursor does not visibly change from "busy" to "auto" until the user moves the pointer.
What is the best way to get the reluctant browsers to switch the mouse pointer?
Press Windows Key +I and go to Ease of access and select Mouse option from the left Pane and try to set default settings for mouse and see if it helps. Hope this information was helpful.
To access mouse settings, select the Start button, then select Settings > Ease of Access > Mouse . Turn on the toggle under Control your mouse with a keypad if you want to control your mouse using a numeric keypad.
I would rather do it more elegantly like so:
$(function(){ $("html").bind("ajaxStart", function(){ $(this).addClass('busy'); }).bind("ajaxStop", function(){ $(this).removeClass('busy'); }); });
CSS:
html.busy, html.busy * { cursor: wait !important; }
Source: http://postpostmodern.com/instructional/global-ajax-cursor-change/
It is a bug in both browsers at the moment. More details at both links (in comments as well):
http://code.google.com/p/chromium/issues/detail?id=26723
and
http://code.google.com/p/chromium/issues/detail?id=20717
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