title: Can I toggle one element and at the same time hide the others?
body: <p>I've been looking around for a while but I'm afraid I'm too begginer for this easy jquery.</p>
  
  <p>I´ve tried show/hide and toggle functions but I don´t find the way to show toggle elements in a page hidding the others. The toggle works, but when I click one I'd like the others to be hidden and I don't find the way. Maybe It's too easy, but I can't find the answer.</p>
  
  <p>This is my jquery</p>
  
  <pre><code>function toggleDiv(divId) { $("#"+divId).toggle();}
  </code></pre>
  
  <p>And this is the html sample</p>
  
  <pre><code>&lt;a href="javascript:toggleDiv('div1');"&gt;Toggle Button 1&lt;/a&gt;
  &lt;div id="div1"&gt;
  &lt;p&gt;paragraph 1&lt;/p&gt;
  &lt;/div&gt;
  &lt;a href="javascript:toggleDiv('div2');"&gt;Toggle Button 1&lt;/a&gt;
  &lt;div id="div2"&gt;
  &lt;p&gt;paragraph 2&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I´ve just created a fiddle that explains better what I mean: <a href="http://jsfiddle.net/vKLNe/" rel="nofollow">http://jsfiddle.net/vKLNe/</a></p>
  
  <p>Thanks in advance for your help and sorry about my english.</p>