• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1292
  • Last Modified:

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.
0
mrduckers
Asked:
mrduckers
1 Solution
 
sundaramkumarCommented:
using javascript you can change cursor

as
document.style.cursor = 'pointer';
this will change the cusror to hand

like that you can use anyother image like

document.style.cursor =url("dot.ani");

0
 
_Marcel_Commented:
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.
0
 
ellandrdCommented:
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
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now