If I have:
<div id='parent'>
<table>
<tr>
<td>
<div id='child1'></div>
</td>
</tr>
<tr>
<td>
<div id='child2'></div>
</td>
</tr>
</table>
</div>
I tried: $ ('# parent> table> tr: eq (1)> div');
I would like to select a specific child div in my index. For example, I would like to select the second child div of child2. Trivial solution:
var div2 = $('#child2');
But I would prefer to do this with the parent div:
var div2 = $('#parent div')...get(1);
Is it possible?
source
share