PDA

View Full Version : Using JS to modify styles



huntercc
06-06-2005, 03:42 PM
I have a script that fades link colors when the mouse hovers over the link, but it fades all links to the same preset color.

I'd like to modify this script to fade to the a.classname:hover color but I don't know how to get the pseudo-class value using Javascript. Is this possible, and if so how?

Thanks in advance!

mwinter
06-06-2005, 06:49 PM
I'd like to modify this script to fade to the a.classname:hover color but I don't know how to get the pseudo-class value using Javascript. Is this possible, and if so how?Not to my knowledge. The getComputedStyle method can accept as its second argument, the name of a pseudo-element, but not a pseudo-class.

Mike