How do I change the style of the cursor with JQuery?

96,068

Solution 1

Modify the CSS cursor value by using the css() method

$('#selector').css('cursor', 'pointer');

Demo : http://jsfiddle.net/jomanlk/H6Nta/

Solution 2

you can play around with this

$('#divid').css('cursor','default');

for pointer

$('#divid').css('cursor','pointer');

api

http://api.jquery.com/css/

Solution 3

using css

http://www.echoecho.com/csscursors.htm

read here for different cursor styles

and apply it

$('#selector').css('cursor', 'value');

Solution 4

Cursors are handled by CSS. You need something like

$('#elementid').css('cursor', 'pointer');

or for old IE browsers

$('#elementid').css('cursor', 'hand');
Share:
96,068
user730569
Author by

user730569

Updated on December 23, 2021

Comments

  • user730569
    user730569 over 2 years

    I want to change the style of the cursor as if it were going over a link. How do I do this?