jquery - show/hide div based on multiple selections
<p>I have a (php/html/jquery/css) page where i'm displaying tags at the top (e.g. green, white, fruit, vegetable)</p>

<p>On the page I have divs marked appropriately with classes:</p>

<pre><code>&lt;div class="green fruit"&gt;apple&lt;/div&gt;
&lt;div class="green vegetable"&gt;broccoli&lt;/div&gt;
</code></pre>

<p>etc.</p>

<p>I'd like to show/hide divs based on which tags have been toggled show/hide.</p>

<p>By default everything is shown. Clicking a tag at the top will toggle the corresponding divs.</p>

<p>The tricky part is to show divs if any of its classes are toggled to 'show' and hide if <em>all</em> of its classes are toggled to hide.</p>

<p>I'm probably making this harder than it needs to be. Thanks for your advice!</p>
