Link to home
Start Free TrialLog in
Avatar of mrduckers
mrduckers

asked on

Cursor image: Use a different image "on click" or "loading"

Hi,
I was wondering how I can set a cursor image to change whe someone clicks on a link or button.
An example is:
My cursor is a tomato
When I click a link, the tomato squashes.

Is this possible and how? If not is is possible to have a different image during loading of a page?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of sundaramkumar
sundaramkumar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Read this: http://www.javascriptkit.com/dhtmltutors/csscursors.shtml

It explains the changing of the cursor with javascript. You can trigger it with on an onClick event.
This article on dynamicdrive shows you how to create a custom cursor:

http://www.dynamicdrive.com/dynamicindex11/customcursor.htm

But like what sundaramkumar has posted, it can be phone:

body{ cursor:url("yourimage.cur"); }

to appear over other elements such as a paragraph; in this case you would have the line as such p { cursor: url("yourimage.cur"); };

Remember, the image that you use for the cursor must be either a .cur or .ani format. If you can't make your own custon cursor, I recommend Debi's Cursors (http://www.debidawn.com/cursors.htm) where you can can find a large selection of free custom cursors as well...

ellandrd