PDA

View Full Version : Style change on mouseover if class = X


circusbred
04-05-2004, 10:20 PM
Basically what I've been trying to do is change filter:opacity onmouseover if the class = x. However, I am trying to call it solely from the script and not use onmouseover= & onmouseout= from the HTML element (in this case it is an IMG). I want to do this because this would be an IE only script ( I can use :hover pseudo-class for other browsers).

This is essentially just a little pet project of mine and I haven't been able to implement it to any success. JS isn't really my strong suit. Thanks for any help you can offer.

edit: woops a smiley ....

Willy Duitt
04-05-2004, 11:00 PM
Did you try: if(className == 'x')

.....Willy

glenngv
04-06-2004, 08:01 AM
http://www.vladdy.net/Demos/IEPseudoClassesFix.html

circusbred
04-07-2004, 08:39 AM
http://www.vladdy.net/Demos/IEPseudoClassesFix.html
Thanks, that's exactly what I was looking for!