JQuery div child of td child of div -


I want to select a group of DIV elements that are contained within a group of TD elements. These TD elements are part of the table inside another DIV. The ID is given in the upper DIV, and TD is a specific category of elements. If I first target the TD elements and select the least DIV elements, then it works. However, there are more elements of this type that are contained in the second-highest DIV elements, which I am targeting the top DIV.

Hope this makes sense.

I am trying to do something like

  $ ('div [id = "uppermost"]> TD.   Div ')   

This works

  $ (' td. & Lt; classname & gt; & gt; div ')   

But more items are also selected than I need.

Maybe you want to:

  $ (top #) Td.whatever & gt; div ')   

"& gt;" The immediate child operator is probably not working for you. & lt; Table & gt; (and also inside & lt; tr & gt; elements inside), as you say, & lt; Td> elements, so they are not the immediate children of the container.

Comments