So I have a table, and there are tables within the cell too, like this:
<table id='table1'>
<tr>
<td>xyz</td>
<td>
<table><tr></tr></table>
</td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
</table>
How do I use jquery to select those only directly under “table1”, but not those under the inside table?
you can use .children()
or child selector
These will select only direct children elements
as @jonathanlonowski stated, it would be safer to use this due to the browsers adding the extra
tbodymarkupThis would also work