title: What JQuery selector excludes items with a parent that matches a given selector?
body: <p>I have</p>
  
  <pre><code>var $set = $('.foo,.bar').filter(
      function() {return $(this).parents('.baz').length &lt; 1;});
  </code></pre>
  
  <p>as a way to select all the elements whose classes are either <code>foo</code> or <code>bar</code> and who do not descend from an element whose class is <code>baz</code>.  Is there a selector that will accomplish the same thing without the need for a filtering lambda?</p>
  
  <pre><code>&lt;div class='foo'/&gt;&lt;!--match this--&gt;
  &lt;div class='bar'/&gt;&lt;!--match this--&gt;
  &lt;div class='baz'&gt;
      &lt;div class='foo'/&gt; &lt;!--don't match this--&gt;
  &lt;/div&gt;
  </code></pre>