title: neat way to implement a jquery custom filter (selecting based on parent's class)?
body: <p>I want to select every textarea that <strong>does not</strong> have a DIV with class <em>red</em> among its parents, do something to each, and then do <strong>something else</strong> with the rest of textareas on the page. In other words, select a set of elements, work on only some of them, and then do something else with the rest.</p>
  
  <p>I know I can do something like below, but is there a less clumsy way of doing it?</p>
  
  <pre><code>$('textarea').filter(function() {
      return $(this).parents("div.red").length &gt; 0;
  }).css('border','1px solid red').end().filter(function() {
      return $(this).parents("div.red").length == 0;
  }).css('border','1px solid green');
  </code></pre>
  
  <p>Thanks!</p>