title: how to select parent div with jquery and close all siblings
body: <p>I have that problem, in html I have this code:</p>
  
  <pre><code>&lt;div&gt;
       &lt;div class='category' style="display:block"&gt;
          &lt;div&gt; &lt;div onclick="closeOtherCategoryDiv($(this))"&gt;Name&lt;/div&gt; &lt;/div&gt;
          &lt;div class="groups"&gt;&lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class='category' style="display:block"&gt;
          &lt;div&gt; &lt;div onclick="closeOtherCategoryDiv($(this))"&gt;Name&lt;/div&gt; &lt;/div&gt;
          &lt;div class="groups"&gt;&lt;/div&gt;
      &lt;/div&gt;
  
      &lt;div class='category' style="display:block"&gt;
          &lt;div&gt; &lt;div onclick="closeOtherCategoryDiv($(this))"&gt;Name&lt;/div&gt; &lt;/div&gt;
          &lt;div class="groups"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So if I click on div with function closeOtherCategoryDiv($(this)) I want to set style attribute display:none for all another div.category except clicked. </p>