[jQuery] descendants
[jQuery] descendants
I have some table rows:
<table>
<tr class="tableRow"><td></td><td></td><td><div>Blah
<div><input="checkbox" id="mycheckname_4343"></div></div></td>
<tr class="tableRow"><td></td><td></td><td><div>Blah
<div><input="checkbox" id="mycheckname_3422"></div></div></td>
<tr class="tableRow"><td></td><td></td><td><div>Blah
<div><input="checkbox" id="mycheckname_3243"></div></div></td>
</table>
that I am selecting like
$("tr[class=.tableRow]").each( function(i)
{
//inside each table row, there are several td's
//inside one of the TD's there is a checkbox that I want to find
//how can I search $(this) to find a checkbox that is nested inside a
td and some div's?
//I'm thinking something like this:
$(this).children("input[id*=mycheckname]:first")
//but children() only searches the IMMEDIATE children of <tr> and the
checkbox is nested inside a TD and some
//div's
//I think I need to be able to search descendants of the <tr> but I
can't figure it out
}
Thanks