I have an HTML table that is defined as follows:
<table id="myTable" cellpadding="0" cellspacing="0">
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Birth Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>John</td>
<td>Smith</td>
<td>03-11-1980</td>
</tr>
</tbody>
</table>
I want to understand how to determine how many rows are in the tbody portion of my table, instead of the table in general. How do I use JQuery to determine how many rows are in the tbody portion of a table?
Thank you!
Like this:
The
a > bselector selects allbelements that are direct children of anaelement. Therefore, this selector will not match rows in nested tables.