title: jQuery - check if children is visible
body: <p>I want to hide a parent div and add a class to body if children div is hidden,
  But when child is visible noting happen</p>
  
  <pre><code>if(jQuery('#toolbar &gt; div').is(':visible')){
      jQuery('#toolbar').slideToggle('fast');
      jQuery('body').toggleClass('body-margin');
  }
  </code></pre>
  
  <p>What is wrong in my code ?</p>
  
  <pre><code>&lt;div id="toolbar"&gt;
      &lt;div class="buttons" &gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>