Hello,
I guess this is a simple css question but I ask this anyhow: I have a
menu i a div id="menuTree" where each menuitemis a link. I want the
menu to behave like this:

Default a color of all links is is blue (should not be the default
browser style but a custom style);
The link hover is red;
When a link is clicked it should change color (say to red) and stay
red when the mouse leaves the link;
When another link in the menu is clicked, the previously selected link
should get the default color and the clicked link should get the
selected color.

I tried this with the a,a:hover,a:active,a:visited pseudo classes but
it doesn't work.

I tried this:
                // switch color to selected link
                var links=$("#menuTree a")
                for each(link in links){
                        //$("#menuTree a").removeClass('linkSelected')
                        $(link).addClass("linkDefault");
                }
                //$(this).addClass('linkSelected')
                $(link).toggleClass("linkSelected");
                e.stopPropagation()
        })
Doesn't work. I don't know if it can be a css only solution
(preferred) or if I need Javascript (that's ok). Can anyone point me
in the right direction?

Thanks!

Marc
--~--~---------~--~----~------------~-------~--~----~
--
You received this because you are subscribed to the "Design the Web with CSS" 
at Google groups.
To post: [email protected]
To unsubscribe: [email protected]
-~----------~----~----~----~------~----~------~--~---

Reply via email to