Easy Tutorial
❮ Misc Callbacks Empty Misc Hasdata ❯

jQuery Parent Descendant Selector

jQuery Selectors

Example

Select all <span> elements that are descendants of <div> elements:


Definition and Usage

The ("parent descendant") selector selects all elements that are descendants of a specified element.

A descendant of an element can be a first-generation, second-generation, third-generation, and so on.


Syntax

Parameter Description
parent Required. Specifies the parent element to be selected. <br>
descendant Required. Specifies the descendant element (of the specified parent element) to be selected.

Try it - Example

Select all <li> elements that are descendants of <ul> elements


jQuery Selectors

❮ Misc Callbacks Empty Misc Hasdata ❯