title: jquery add / remove class from .parent()
body: <p>i know this is incredibly easy  but I have been writing and rewriting this function for an hour with no success:</p>
  
  <p>On click I want to add "active" to the <code>&lt;li&gt;</code> of the clicked link and remove "active" from all the other <code>&lt;li&gt;</code>'s in the navbar.</p>
  
  <p>HTML:</p>
  
  <pre><code>   &lt;nav&gt;
       &lt;ul&gt;
         &lt;li&gt;&lt;a href="http://0327ea8.netsolhost.com/#home" class="home"&gt;Home&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="http://0327ea8.netsolhost.com/blog/" class="blog"&gt;Blog&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="http://0327ea8.netsolhost.com/#catalog" class="catalog"&gt;Catalog&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="http://0327ea8.netsolhost.com/#authors" class="authors"&gt;Authors&lt;/a&gt;&lt;/li&gt;
         &lt;li&gt;&lt;a href="http://0327ea8.netsolhost.com/#store" class="store"&gt;Store&lt;/a&gt;&lt;/li&gt;
       &lt;/ul&gt;
     &lt;/nav&gt;
  </code></pre>
  
  <p>jQuery:</p>
  
  <pre><code>  // NAVBAR ADD ACTIVE
     $("nav ul li a").click(function(){
       $("nav ul li").removeClass('active');
       $(this).stop().animate();
       $(this).parent().addClass('active');
     });
  </code></pre>
  
  <p>This is adding the classes just fine but I can't get it to remove.</p>
  
  <p>I've also tried separating it into to separate functions with no luck.</p>
  
  <p>I have the .stop().animate() in there because I have a .animate() on the hover state of the links.</p>
  
  <p>thanks!</p>
  
  <p>edit:</p>
  
  <p>this is the jQuery for the hover and the reason I have .stop().animate()</p>
  
  <pre><code>   $("nav ul li a, aside ul li.categories a, div.posts div.foot a").hover(function(){
       $(this).animate({'backgroundColor' : '#edf5e9'}, 200);
     },function() {
       $(this).animate({'backgroundColor' : '#ccd4c8'}, 600);
     });
  </code></pre>
  
  <p>I'm not sure why the .stop().animate() is wrong. If I don't have .animate() the active class won't stick, if I do, the active class does.</p>
  
  <p>I still can't get the class to remove though :-/</p>