A
Adam
Hi all,
Is there a way to edit the properties of a CSS pseudo class using
Javascript? I have some code that changes the text colour in a div
element to a given value, but it doesn't affect the links. For
example, to change the text in "mydiv" to #FF0000, I'd use
document.getElementById("mydiv").style.color="#FF0000";
In CSS this would be written as #mydiv{color:#FF0000;}. What I want to
do is change the :link and :visited pseudo-classes in the same way,
i.e. to replicate the following CSS code using Javascript:
#mydiv a:link, a:visited{color:#FF0000;}
Any help would be very gratefully received!
Many thanks,
Adam
Is there a way to edit the properties of a CSS pseudo class using
Javascript? I have some code that changes the text colour in a div
element to a given value, but it doesn't affect the links. For
example, to change the text in "mydiv" to #FF0000, I'd use
document.getElementById("mydiv").style.color="#FF0000";
In CSS this would be written as #mydiv{color:#FF0000;}. What I want to
do is change the :link and :visited pseudo-classes in the same way,
i.e. to replicate the following CSS code using Javascript:
#mydiv a:link, a:visited{color:#FF0000;}
Any help would be very gratefully received!
Many thanks,
Adam