title: hide and show div click on a
body: <p>i want to hide id 
  when i click on a href so its same id shows and other id will close automatically</p>
  
  <p>example :</p>
  
  <pre><code>&lt;div id="fit" class="heading"&gt;FIT&lt;/div&gt;
  &lt;a href="#er"&gt;first&lt;/a&gt;
  &lt;div id="er" style="display:none;"&gt;aksdjfhaskdj hskj hskjfh sd fghjgfdjf gdsjfdg jdfgjdf gjgdfjgfdjf gasdkjfasjfghsdj &lt;/div&gt;
  &lt;a href="#erp"&gt;erp&lt;/a&gt;
  &lt;div id="erp" style="display:none;"&gt;erp &lt;/div&gt;
  &lt;div id="style" class="heading"&gt;style&lt;/div&gt;
  </code></pre>
  
  <p>and script: </p>
  
  <pre><code>&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(e) {
      $("a").click(function(e) {
          var ab = $(this).attr("href");
          //alert(ab);
          //$("div").hide();
          $(ab).show();
  
      });
  });
  &lt;/script&gt;
  </code></pre>