finding elements with text using jQuery

Posted by Tim Sheiner on Stack Overflow See other posts from Stack Overflow or by Tim Sheiner
Published on 2009-06-19T16:24:38Z Indexed on 2010/05/25 16:11 UTC
Read the original article Hit count: 112

Filed under:
|

I want to create an array of all the html elements within a div that contain text strings, such as

<p>some string</p>.

I don't want to get hold of the strings, I want the array items to be the elements (in the example, would be the p node). I do not know before hand what the strings will be, so I can't look for string values to match. I also don't want empty text nodes to end up in the array.

Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about textnode