[solved] searching for certain text

[solved] searching for certain text

Hey Guys,
I have a new problem:

I have some elements (table, div, ...) which contains content. Now I want to search an certain text and do something if one element contains this text:

Example:
searching for 'schnitzel'

Code 1
  1. <div>
  2.       <p>some text</p>
  3. </div>
  4. <div>
  5.       <p>other text</p>
  6. </div>
  7. <table>
  8.       <tr>
  9.             <td>
  10.                   <p>some text again</p>
  11.             </td>
  12.       </tr>
  13. </table>
-> do nothing


Code 2
  1. <div>
  2.       <p>some text</p>
  3. </div>
  4. <div>
  5.       <p>other text</p>
  6. </div>
  7. <table>
  8.       <tr>
  9.             <td>
  10.                   <p>schnitzel</p>
  11.             </td>
  12.       </tr>
  13. </table>
-> do something!

now I tried the :contain filter, but it don`t work. I hope you understand my problem and can help me. :-)

THX!!
snuwie