View Full Version : Simple Javascript Class/Fade help

12-05-2009, 09:56 PM
I have a script that fades links on load and im trying to get this to work on everything but the menu link that has the "active" class

<div id="menu">
<ul><li id="Home"><a title="Home" href="/" style="opacity: 0.6;">Home</a></li>
<li class="active" id="projects"><a title="projects" href="/projects/" style="opacity: 0.6;">projects</a></li>
<li class="last" id="Contact"><a title="Contact" href="/contact" style="opacity: 0.6;">Contact</a></li>

and here is the javascript.. (JQuery)

$("#menu a").fadeTo("slow", 0.6); // This sets the opacity of the menu to fade down to 60% when the page loads
$("#menu a").hover(function(){
$(this).fadeTo("slow", 1.0); // This should set the opacity to 40% on hover
$(this).fadeTo("slow", 0.6); // This should set the opacity back to 100% on mouseout

What do I add so any "<li>" that has the class "<li class="active"> isnt effected by the javascript so it just displays at 1.0 instead of 0.6?