title: adding a class on click of Anchor tag
body: <p>Lets say I have the following HTML...  </p>
  
  <pre><code>&lt;a class="active" href="#section1"&gt;Link 1&lt;/a&gt;  
  &lt;a href="#section2"&gt;Link 2&lt;/a&gt;  
  </code></pre>
  
  <p>When a link 2 is clicked I would like it to receive the active class and remove the class from link 1 itself so it would effectively become:  </p>
  
  <pre><code>&lt;a href="#section1"&gt;Link 1&lt;/a&gt;  
  &lt;a class="active" href="#section2"&gt;Link 2&lt;/a&gt;
  </code></pre>
  
  <p>This should work both ways. Ie. whatever link is clicked gets the class and removes it from the other.</p>
  
  <p>How can this be done with jQuery?
  Thanks in advance!</p>