Think of a family tree:
"Parent > Child" will select items under the parent that are *only
directly* children of the parent (hence the term "children")
"ancestor descendant" will select *any* descendant under the parent
(so it could be a child, grandchild, grandchild's child, etc etc
so with:
<div id="Container">
<div>
<div></div>
<div></div>
<div></div>
</div>
<div>
<div></div>
<div></div>
<div></div>
</div>
<div>
<div></div>
<div></div>
<div></div>
</div>
</div>
$("#Container > div") would get three items
$("#Container div") would get twelve items
On Dec 12, 4:06 pm, bram1028 <[email protected]> wrote:
> I'm confused by two of the hierarchal selectors: "ancestor descendant"
> and "parent > child". From the documentation and samples, they seem to
> provide the same results. Am I missing something?
>
> Thanks for anyone who can clarify these.