title: add/remove active class for ul list with jquery?
body: <p>I'm trying to remove and set an active class for a list item every time it's clicked. It's currently removing the selected active class but isn't setting it.  Any idea what I'm missing?</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;ul class="nav nav-list"&gt;
    &lt;li class='nav-header'&gt;Test&lt;/li&gt;
    &lt;li class="active"&gt;&lt;a href="page1.php"&gt;Page 1&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="page2.php"&gt;Page 2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="page3.php"&gt;Page 3&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>jquery:</p>
  
  <pre><code> $('.nav-list').click(function() {
  
      //console.log("Clicked");
      $('.nav-list li.active').removeClass('active');
      $(this).addClass('active');
  });
  </code></pre>