Jquery: selecting elements that do not only have children with the same class name?
<p>How do I make a jQuery selector that selects all elements with the class name "foo", except for those that ONLY have children with the class name of "bar".</p>

<pre><code>&lt;!-- Don't select this --&gt;
&lt;div class="foo"&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;!-- Don't select this --&gt;
&lt;div class="foo"&gt;
    &lt;div class="bar"&gt;&lt;p&gt;Some text&lt;/p&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;p&gt;Some text&lt;/p&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;!-- Select this --&gt;
&lt;div class="foo"&gt;
    &lt;p&gt;Some text&lt;/p&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
    &lt;div class="bar"&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;!-- Select this --&gt;
&lt;div class="foo"&gt;
    &lt;p&gt;Some text&lt;/p&gt;
&lt;/div&gt;
</code></pre>
