As you know, some <table> start with <tr><th> excepts <tr><td>. So how can we always select the first <tr> that has <td> in a table?
<table>
<tr><th>
<tr><td>
<tr>
<td>
I tried but was unsuccessful.
$("tr:has(> td):first-child")
Your answer is very close indeed. To select the first tr that has td use:
tr
td
$("tr:has(td):first") //OR $("tr:has(td)").first() //OR $("tr:not(:has(th))").first()
1.4m articles
1.4m replys
5 comments
56.9k users