Reputation:
i cant figure out the correct selector for a table.
<tr id="test1">
<td></td>
<td></td>
</tr>
<tr>
<td colspan="2">\*SELECT THIS \*</td>
</tr>
I want to select tr with id and chose the input of of the 2nd tr "*SELECT THIS*"
$("#test1").next()
So i'm inside the 2nd tr, but i want the td under this tr.
$("#test1").next().$("td")
is not working.
Any ideas?
Upvotes: 4
Views: 87
Reputation: 34556
$("#test1").next().children('td');
From the sibling, you then need to delve into its children. More concise would be:
$('#test1 + tr td');
Upvotes: 4