Sunday, June 2, 2024
 Popular · Latest · Hot · Upcoming
117
rated 0 times [  124] [ 7]  / answers: 1 / hits: 63652  / 11 Years ago, mon, july 1, 2013, 12:00:00

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;

More From » jquery

 Answers
16

Do it in both html and body:



$('html,body').css('cursor','crosshair');


http://jsfiddle.net/2Qffw/3/


[#77272] Sunday, June 30, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kentrelle

Total Points: 333
Total Questions: 93
Total Answers: 95

Location: Vietnam
Member since Sun, Oct 18, 2020
4 Years ago
;