title: Very Simple .toggleClass for Div's based on HREF
body: <p><strong><em>This problem has been solved. Below is the original question and the finalized code. Thanks for the help Amit Joki!</em></strong></p>
  
  <p>I am trying to make A tags with the class "i" on-click show/hide divs based off their ids being used as anchors. If one link is clicked the other should be switched to back to hidden.</p>
  
  <p>Javascript: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$(".i").on('click', function(e) {
    $("div").each(function() {
      $('div.show').hide().toggleClass("show hidden");
    });
    $($(this).attr("href")).fadeIn(1000, 'swing').toggleClass("hidden show");
  });</code></pre>
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.hidden {
    display: none;
  }
  .show {
    display: block;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;a href="#1" class="i"&gt; Div 1 &lt;/a&gt;
  &lt;a href="#2" class="i"&gt; Div 2 &lt;/a&gt;
  
  &lt;div id="1" class="hidden"&gt;
    &lt;div&gt;Div 1&lt;/div&gt;
  &lt;/div&gt;
  
  &lt;div id="2" class="hidden"&gt;
    &lt;div&gt;Div 2&lt;/div&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <pre><code>http://jsfiddle.net/krY56/180/
  </code></pre>