title: jquery find text inside <td>
body: <p>I'm playing around with some selectors, and I'm hitting a wall with selecting Text inside a  cell.  </p>
  
  <p>Here's a simple attempt I'm making.</p>
  
  <pre><code>&lt;table&gt;
   &lt;tr&gt;
       &lt;td&gt;First Name&lt;/td&gt;
       &lt;td&gt;*required&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt; 
  </code></pre>
  
  <p>I want to change the class for that cell to be "red" - if the string "*required" is found.</p>
  
  <p>Here's my attempt at the jquery:</p>
  
  <pre><code>$("td:contains('*required')").addClass("red");
  </code></pre>
  
  <p>It's causing all cells to apply that class, it seems.
  Any better ways to look for specific text?</p>