Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

onMouseOver - pointer to hand 1

Status
Not open for further replies.

Slippenos

MIS
Apr 22, 2005
333
US
Is there any way that, when my pointer is over an image- it changes from the pointer to the hand?

Thanks.
 
add style="cursor:hand;" as an attribute of the img tag

Matt
"Success is 10% inspiration, 90% last minute changes
 
Apparently "hand" is a non-standard IE option. The correct name is "pointer" (as in a pointing hand, not a pointing arrow). I know it sounds silly, but that's the way it is.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Tracy is correct, use style='cursor:pointer' instead of hand. Pointer is a cross browser solution and hand works in IE only. It's kinda like .parentElement, why use it when .parentNode is cross browser.

I know I'm not really adding anything to this thread with my reply, but I just spent the last couple days fixing some old code that another colleague had written 2 years ago, and this is one of the things that I had to change multiple times. So, I want to emphasize that you should use cursor:pointer now so that you don't have to go back and fix it later to make your site cross-browser compatible.

-kaht

...looks like you don't have a job, so why don't you get out there and feed Tina.
headbang.gif
[rockband]
headbang.gif
 
Thanks for the backup kaht. I think you may be the one who pointed that out to ME a few weeks ago (I've been using "hand" for years and never knew that).


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top