Easy Tutorial
❮ Event Error Misc Deferred Resolvewith ❯

jQuery :parent Selector

jQuery Selectors

Example

Select all <td> elements that have child elements or contain text:

$("td:parent")

Definition and Usage

The :parent selector selects all elements that are parent elements, including those with text nodes.

:parent is the opposite of :empty.

It is important to note that :parent (and :empty) includes child elements, including text nodes.


Syntax


jQuery Selectors

❮ Event Error Misc Deferred Resolvewith ❯