Click to See Complete Forum and Search --> : Rollover change cursor on images
essjay_d12
03-14-2006, 07:42 AM
Is there a way you can add a rollover change of cursor to an image that is not a link?
The image actually runs a bit of javascript that changes the style sheet - but i would like the users to realise that these images actually perform a function and I feel that a rollover change in cursor will aid their understanding.
Thanks
D
You'll want to use the cursor property:
http://www.htmlgoodies.com/beyond/css/article.php/3470321
KDLA
essjay_d12
03-14-2006, 09:09 AM
but its not a link, so the class doesnt seem to work when added to an image tag.
What type of javascript are you running? I misunderstood, thinking that you had something like this:
<a javascript:onclick....><img src=""/></a>
Can you provide some code or a link to the page?
essjay_d12
03-14-2006, 11:47 AM
<img src="AT.JPG" alt="s" width="15" height="16" onClick="runjavascript('CSS/ATs.css');"/>
<img src="AT.JPG" alt="s" width="15" height="16" onClick="runjavascript('CSS/ATs.css');" onmouseover="this.style.cursor='hand';" onmouseout="this.style.cursor='auto';"/>
You can change the "hand" to any of those mentioned in the article I sent earlier.
KDLA
essjay_d12
03-14-2006, 12:51 PM
<img src="AT.JPG" alt="s" width="15" height="16" onClick="runjavascript('CSS/ATs.css');" onmouseover="this.style.cursor='hand'" onmouseout="this.style.cursor='auto'"/>
I've tried that and still doesnt seem to be working.
Im only on localhost so I cant give you a link sorry.
Your javascript file may be overriding the local js coding.
You might post a question in the javascript forum. Someone might be able to change your js coding to include the onmouseover event.
Good Luck -
KDLA
rch10007
04-16-2006, 04:58 AM
onMouseOver not onmouseover