title: jQuery I want to add an active class to the linked ID of an anchor tag
body: <p>I've written an alphabet navigation program- I have anchor linked linked to h4 tags. When I click the a-tag, I want the element with the matching ID to have a class of active. When you click another anchor tag, it removes the class of active and assigns it to another element. Here's what I have so far:</p>
  
  <pre><code>&lt;ul class="no-bullet inline"&gt;
              &lt;li&gt;&lt;a class="scroller" href="#a"&gt;&lt;strong&gt;A&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="scroller" href="#b"&gt;&lt;strong&gt;B&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
              &lt;li&gt;&lt;a class="scroller" href="#c"&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
  
            &lt;/ul&gt;
  
  &lt;h4 class="alpha-heading" id="a"&gt;&lt;strong&gt;A&lt;/strong&gt;&lt;/h4&gt;
  
  &lt;h4 class="alpha-heading" id="b"&gt;&lt;strong&gt;B&lt;/strong&gt;&lt;/h4&gt;
  
  &lt;h4 class="alpha-heading" id="c"&gt;&lt;strong&gt;C&lt;/strong&gt;&lt;/h4&gt;
  
  
  $("scroller").on("click", function(){
  function matchAlpha(){
  var matchID = $(this).attr("href");
  find.$(matchID).find.$(alpha-heading).removeClass("active");
  find.$(matchID).find.$(this).$(alpha-heading).addClass("active");
  }
  
  });
  </code></pre>