jQuery :parent Selector
Learn all about the jQuery function :parent Selector.
This is the inverse of
One important thing to note regarding the use of
:empty) is that child nodes include text nodes.
The W3C recommends that the
<p> element have at least one child node, even if that child is merely text (see http://www.w3.org/TR/html401/struct/text.html#edef-P). Some other elements, on the other hand, are empty (i.e. have no children) by definition:
<hr>, for example.
To obtain the parents or ancestors of an existing jQuery set, see the