Hand Cursor with JavaScript

by Marcellino Bommezijn (October 19, 2001)

Question

How can i make the user aware of a button (OnClick Event) when there is now link (HREF) attached ?

Answer

Use a CSS style with a OnMouseOver event.

Create the following style in your document or CSS:

<style type="text/css">
<!--
.cursor {  cursor: hand}
-->
</style>

Attach it to the OnClick Event:

OnMouseOver="this.className='cursor';"

User Rating (148 votes)
6 reviews available | Read all reviews »

 

Marcellino Bommezijn

Marcellino BommezijnMarcellino Bommezijn is one of the managers at dmxzone.com. He is a contributor on the tutorials section.

Owner of Senzes Media (http://www.activecontent.nl) which provides professional services and web applications for mid-sized companies.

ActiveContent CMS is the ASP.NET Content Management solution that is used for building professional and rich-featured websites.

See All Postings From Marcellino Bommezijn >>

User Reviews

Total of 6 reviews
RE: Prevent default page number - url while pritning
Written by Nagendra Rentala on March 23, 2004

I found the solution. Actually, it is in the Page Setup dialog - header and footer options.

Prevent default page number - url while pritning
Written by Nagendra Rentala on March 23, 2004

How can I prevent the page number and url being printed by default along with the web page content? I do not see these as options on my printer dialog box either. Thanks for the help, Nagu Rentala

RE: Custom hand cursor
Written by Marcellino Bommezijn on October 12, 2003

Point to the URL where the custom cursor is located. Something like this: cursor:url(mycursor.ani) This will probably only work where this class is defined in your page (hyperlinks) and not outside.

Very usefull!!
Written by Roberto Bellina on October 12, 2003

The tutorial is well explained, although it would have been even better if there were an example for newbie users, like me... Yhank you anyway, I managed to put it at work...doesn't work with Safari on MacOSX

This is not absolutely true
Written by Ana Kya on July 27, 2003

According to CSS specifications 'hand' is not an attribute of cursor. You should use 'pointer'. What happens is that Internet Explorer does not implement CSS correctly so IMHO the correct answer should be to use both: .cursor{ cursor: pointer; ...

Custom hand cursor
Written by Daryl Wail on February 14, 2003

How do I customize the pointer cursor to one of my own within my own web site?

Follow us on Facebook Follow us on twitter Subscribe to the RSS feed
Activate your free membership today | Login | Currency