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

做~自己de王妃 提交于 2019-11-29 05:28:17

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

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

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

you can play around with this

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

for pointer

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

api

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

using css

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

read here for different cursor styles

and apply it

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

Cursors are handled by CSS. You need something like

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

or for old IE browsers

$('#elementid').css('cursor', 'hand');
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!