title: JavaScript - Hide all other divs
body: <p>I've a number of divs that are only visible after clicking a link. How to close all open divs so that only the clicked one is visible?<br>
  I'm using this .js:</p>
  
  <pre><code>    function showhide(id){
          if (document.getElementById) {
          var divid = document.getElementById(id);
          divid.style.display = (divid.style.display=='block'?'none':'block');
          } }
  
          &lt;a href="javascript:void(null)" onclick="showhide('features');"&gt;features&lt;/a&gt;
  &lt;a href="javascript:void(null)" onclick="showhide('design');"&gt;design&lt;/a&gt;
  &lt;a href="javascript:void(null)" onclick="showhide('create');"&gt;create&lt;/a&gt;
  </code></pre>
  
  <p>Thanks
  Uli</p>