Jquery .text() call returns null?

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-03-13T07:21:16Z Indexed on 2010/03/13 7:25 UTC
Read the original article Hit count: 175

Filed under:
|

Hey all,

I'm practicing Jquery and I've written this simple Jquery statement:

var someText = $("table tr td").text();

Should this not return all text of td elements found within tr's that are found within tables? How do I fix this? Currently when I run this, it says that table tr td is null, but I have a table on the page I'm testing on.

Thanks!

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about selectors