Ahh that explains clearly why my expectations were so different from
the results.
Thank you both Glen and Dave!
> $("#testtable tr").each(function(t){
That selector says to select any tr that is a descendant of
#testtable. And it did! The tr in nested tables are descendants of the
original table too, but they're not direct children. If you just want
the tr elements in the outer table, try a selector like
I whipped up a demo.
http://www.commadot.com/jquery/nestedTables.php
In the code comments is an "each" version that does the same thing.
Glen
On 10/25/07, hans <[EMAIL PROTECTED]> wrote:
>
>
> Hello,
>
> I am trying to loop through all rows of a table that has a table
> inside. I expected jquery
3 matches
Mail list logo