How can I hide elements which only contain hidden DIVs in jQuery?
<p>I want to hide all blocks which only contain hidden DIVs (aside from a caption). All elements have to be selected via class names.</p>

<p>In detail, I want each "eventBlock" not to show up when all "groupBlocks" underneath are already hidden. The same with "Menu" which should not show up when all child eventBlocks are hidden.</p>

<p>Each "Menu" contains multiple eventBlocks, </p>

<p>each "eventBlock" contains 1 or more groupBlocks.</p>

<p>I am using classes and cannot use IDs because there are lots of groupBlocks, eventBlocks etc.</p>

<p>DIVs are hidden using JQuery's "hide()" function, if it's relevant.</p>

<p>My HTML basically looks like this:</p>

<pre><code>&lt;div class="Menu"&gt;
     &lt;strong&gt;&lt;a name="one"&gt;Menu CAPTION&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;
     &lt;div class="eventBlock event1"&gt;
         &lt;p class="underlined"&gt;eventBlock CAPTION&lt;/p&gt;
         &lt;div class="groupBlock group2"&gt;
             &lt;strong&gt;name&lt;/strong&gt;&lt;br /&gt;
             4pm - 6pm&lt;br /&gt;
         &lt;/div&gt;
         &lt;div class="groupBlock group1"&gt;
             &lt;strong&gt;name&lt;/strong&gt;&lt;br /&gt;
             5pm - 7pm&lt;br /&gt;
         &lt;/div&gt;
     &lt;/div&gt;
&lt;/div&gt;
</code></pre>
