title: jQuery selector for an element that directly contains text?
body: <p>I was able to get this partially working using the <code>:contains</code> selector, but my problem is if an element contains an element that contains the text it is still returned.  For example:</p>
  
  <pre><code>$('div:contains("test")')
  </code></pre>
  
  <p>Will select both divs below:</p>
  
  <pre><code>&lt;div&gt;something else
     &lt;div&gt;test&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>fiddle: <a href="http://jsfiddle.net/TT7dR/" rel="noreferrer">http://jsfiddle.net/TT7dR/</a></p>
  
  <p>How can I select only divs that "directly" contain the text?  Meaning that in the above example only the child div would be selected.</p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Just to clarify, if I were searching for the text "something else" instead of "test" then I would like to only find the parent div.</p>