I have a table with a nested table…
<table id="Table1">
<tr>
<td>
Row 1
</td>
</tr>
<tr>
<td>
Row 2
<table id="Table2">
<tr>
<td>
Row 1
</td>
</tr>
</table>
</td>
</tr>
</table>
I use jQuery to find the tr row count…
var RowCount = $("#Table1 tr").length;
How do I write jquery to find ONLY the row count of the parent table Table1 and not the combined nested Table2 ? For example: the result I would be looking for would be RowCount = 2 and not RowCount = 3.
I’ve renamed
RowCounttorowCount, because only consstructor names start with a capital, by convention.