I wanted to use a script to change the mouse pointer on my website using JavaScript. It's better done by CSS but my requirement is of a script that can be distributed to many people to embed in the head section of their websites. Through CSS, this can be manipulated by
html
{
cursor: *cursorurl*
}
How to do the same in JavaScript?
Or you can try the following :
For sometimes,
target_element.style.property = value
, hasn't worked for me due to reasons unknown to me...Javascript is pretty good at manipulating css.
or with jquery:
Firefox WILL NOT WORK unless you specify a default cursor after the imaged one!!
other cursor keywords
Also remember that IE6 only supports .cur and .ani cursors.
Look at this page: http://www.webcodingtech.com/javascript/change-cursor.php. Looks like you can access cursor off of style. This page shows it being done with the entire page, but I'm sure a child element would work just as well.
With regards to @CrazyJugglerDrummer second method it would be: