title: My JS work with only one id and ignores other (new to JS)
body: <p>I started to making Java Script with jquery, i need simple code to make my divs hidden and shown by clicking on the link </p>
  
  <p>JS:</p>
  
  <pre><code>    $(document).ready(function(){
      $('#show').click(function() {
      var cname = this.className;
      if ($(cname).is(':visible')) {
      }
      else ($('#cont').is(':visible')) {
          $('#cont').slideToggle('slow');
          $(cname).slideToggle('slow');
      }
      });
  });¨
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>            &lt;a class="home" id="show" href="#"&gt;Home&lt;/a&gt;
              &lt;a class="contact" id="show" href="#"&gt;Contact&lt;/a&gt;
              &lt;a class="about_us" id="show" href="#"&gt;About us&lt;/a&gt;
  
  
  
             &lt;div id="cont" class="home" style="Display :visible ;"&gt;
             &lt;/div&gt;
             &lt;div id="cont" class="contact" style="Display :none ;"&gt;
             &lt;/div&gt;
             &lt;div id="cont" class="about_us" style="Display :none ;"&gt;
             &lt;/div&gt;
  </code></pre>