I want to select a set of DIV elements that are contained inside a set of TD elements. These TD elements are part of a table inside another DIV.
The uppermost DIV has a given ID, and the TD elements have a specific class. If I select the lowermost DIV elements by targeting the TD elements at first, it works. However, there are more elements of this kind that are contained in another uppermost DIV elements different that the uppermost DIV I’m targeting.
Hope it makes sense.
I’m trying to do something like
$('div[id="uppermost"] > td.<classname> > div')
This works
$('td.<classname> > div')
but more items of what I need are also selected.
Probably you want:
The “>” immediate child operator is probably what’s making yours not work. The
<td>elements are, as you say, inside a<table>(and inside<tr>elements too), so they’re not immediate children of the container.