something like this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="
http://meyerweb.com/eric/tools/css/reset/reset.css"; />
    <script type="text/javascript" src="
http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js";></script>
    <style>
        body {
            background-color:#d4d4d4;
        }

        a, a:visited {
            color: darkblue;
        }

        a.selected, a:hover {
            color: magenta;
        }
    </style>
    <script>
        $(document).ready(function() {
            //select the first link when page loads in
            $("ul.menuNav a:first").addClass("selected").show();
            //
            $("ul.menuNav a").click(function() {

                $("ul.menuNav a").removeClass("selected");
                $(this).addClass("selected");

                return false;
            });

        });
    </script>
</head>
<body>
    <div id="menuTree">
        <ul class="menuNav">
            <li><a href="#">click me</a></li>
            <li><a href="#">click me</a></li>
            <li><a href="#">click me</a></li>
        </ul>
    </div>
</body>
</html>


2009/7/23 marc <[email protected]>

>
> I should have mentioned that the link is not meant to navigate away
> from the page. When I click a menuitem link I set the value of a
> hidden field to the links 'value' attribute but I stay on the page.
> Only when clicking another link a new page gets requested (the menu
> gets redrawn on the next page though).
>
> That's working fine now.
>
> So my question is: How can I make a link that gets red when clicked
> while the previously clicked link changes from red back to the default
> color?
>
> 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