Hello,
I'm a webmaster, and I am actually writing a little javascript tool to manage a menu.
I am trying to dynamically change some of my links attribute :
In my HTML code here's what you can find :
In javascript I would like to do is to change the "class attribute of the link. I thought it should look like this :
On my stylesheet I use (for the classes for links) the Hover functionnality. Because the first method didn't work, I have tried the following :
This didn't work either, and I can't find any information on the web. So I leave this question for you experts![[tongue] [tongue] [tongue]](/data/assets/smilies/tongue.gif)
Thanks for any help
Lagaye![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)
I'm a webmaster, and I am actually writing a little javascript tool to manage a menu.
I am trying to dynamically change some of my links attribute :
In my HTML code here's what you can find :
Code:
<a href="something_not_important" class="MenuLinkClass1" id="MyLink">
In javascript I would like to do is to change the "class attribute of the link. I thought it should look like this :
Code:
MyLink.class = "MenuLinkClass2";
On my stylesheet I use (for the classes for links) the Hover functionnality. Because the first method didn't work, I have tried the following :
Code:
MyLink.style.color = SomeColor;
MyLink.style.Hover.color = SomeOtherColor;
This didn't work either, and I can't find any information on the web. So I leave this question for you experts
![[tongue] [tongue] [tongue]](/data/assets/smilies/tongue.gif)
Thanks for any help
Lagaye
![[afro] [afro] [afro]](/data/assets/smilies/afro.gif)