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
and here is the javascript.. (JQuery)Code:<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> </ul> </div>
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?Code:$(document).ready(function(){ $("#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 },function(){ $(this).fadeTo("slow", 0.6); // This should set the opacity back to 100% on mouseout }); });


Reply With Quote
Bookmarks