How can I select the first child of all the children of a jQuery object?
Posted
by
sawa
on Stack Overflow
See other posts from Stack Overflow
or by sawa
Published on 2013-11-10T03:48:58Z
Indexed on
2013/11/10
3:53 UTC
Read the original article
Hit count: 191
jQuery
|jquery-selectors
I have a <tr> which includes several <td>s, each of which includes exactly one <div>, which may have further structure:
<tr id="foo">
<td><div>...</div></td>
<td><div>...</div></td>
...
<td><div>...</div></td>
</tr>
Given a jQuery selector obj = $('#foo'), how can I get a selector that points to all the <div>s directly under a <td> under the <tr> (but nothing within the <div>s)?
Probably chldren() and/or find() may be relevant, but I am not sure.
© Stack Overflow or respective owner