How can I change the mouse cursor in Javascript or in jQuery ? I know it’s a very classic question, but very strangely this JSFiddle doesn’t work : http://jsfiddle.net/2Qffw/.
Here is the code :
$('body').css('cursor','pointer'); document.body.style.cursor = "pointer";
Advertisement
Answer
Do it in both html
and body
:
$('html,body').css('cursor','crosshair');