How to Change Cursor from Pointer to Finger Using Jquery

How to change cursor from pointer to finger using jQuery?

$('selector').css('cursor', 'pointer'); // 'default' to revert

I know that may be confusing per your original question, but the "finger" cursor is actually called "pointer".

The normal arrow cursor is just "default".

all possible default pointer looks DEMO

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

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

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

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

Change mouse cursor in Javascript or jQuery

Do it in both html and body:

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

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

change cursor to finger pointer

<a class="menu_links" onclick="displayData(11,1,0,'A')" onmouseover="" style="cursor: pointer;"> A </a>

It's css.

Or in a style sheet:

a.menu_links { cursor: pointer; }

Javascript Hover Cursor Pointer

It seems to work here after I cleared up your jquery, you forgot to close the first click function and the searchform and button aren't declared in your html (i changed it to #example tr)

Basically your jQuery wasn't that well coded (there also was a line with 5.}) on it that didn't belong there).

I also set the "your framework" to jQuery instead of the standard selected mooTools

This is the complete jQuery code I got after i deleted some unnecessary code:

$(document).ready(function() {

$('#example tr').click(function() {
var href = $(this).find("a").attr("href");
if(href) {
window.location = href;
}
});

$('#example tr').hover(function() {
$(this).css('cursor','pointer');
});

});

Fiddle

Change the mouse cursor on mouse over to anchor-like style

Assuming your div has an id="myDiv", add the following to your CSS. The cursor: pointer specifies that the cursor should be the same hand icon that is use for anchors (hyperlinks):

CSS to Add

#myDiv
{
cursor: pointer;
}

You can simply add the cursor style to your div's HTML like this:

<div style="cursor: pointer">

</div>

EDIT:

If you are determined to use jQuery for this, then add the following line to your $(document).ready() or body onload: (replace myClass with whatever class all of your divs share)

$('.myClass').css('cursor', 'pointer');

JS change cursor to a hand pointer

Hi there thanks for your help, but I found out what i was looking for it was a simple change in the STM31 js file that was styling the the menu:

function getcursor(it)
{
if(nNN6)
return "pointer";
return it.type!="sepline"&&((it.mbi==0&&getme(it).click_sh&&getsub(it))||it.url!="") ? "hand" : "default";
}

the return code was set to "default" so this was changed to "pointer". Just to point out the menu js file is mainly being used to display the menu drop down text.

again thanks for your time and help!

change cursor to pointer on the icon for bootstrap has feedback input

Your stylesheet has the following rule which applies to the <span> enclosing the icon:

.form-control-feedback {
/* ... */
pointer-events: none;
}

You'll need to remove, modify, or override that rule to get the cursor to change.

How to change a cursor to a pointer when hovering over a dynamic list using JQuery

How about using plain css using :hover pseudo

.item:hover { cursor: pointer; }

If you must use javascript, use mouseenter instead of mouseover and reset to default on mouseleave.



Related Topics



Leave a reply



Submit