I have a navigation called #nav ul li a. In this list, I want to add the class active to the element on which has been clicked.
This is my jquery
$(document).ready(function() {
$('#nav ul li a').click(function() {
$('#nav ul li a').removeClass('active"');
$(this).addClass('active');
return false;
});
});
and this is my html
<header id="header">
<h1 id="logo"><a href="#intro">DerWäschestuhl</a></h1>
<nav id="nav">
<ul>
<li><a href="#one" class="active" id="uebersicht-btn">Übersicht</a></li>
<li><a href="#two" class="" id="aussehen-btn">Aussehen</a></li>
<li><a href="#work" class="" id="funktionen-btn">Funktionen</a></li>
<li><a href="#produktion" class=""id="produktionen-btn">Produktion</a></li>
<li><a href="#contact" class="" id="kaufen-btn">Kaufen</a></li>
</ul>
</nav>
</header>
and here is my jsfiddle to show the stylesheets: http://jsfiddle.net/Usgk3/
Do you guys have any idea why it isnt working? I cant find the mistake