jQuery * Selector

Example

Select all elements within <body>:

$("body *")

Try It Yourself

Definition and Usage

The * selector selects each individual element in the document, including html, head, and body.

When used with other elements (nested selectors, as shown in the example above), this selector selects all child elements within the specified element.

Syntax

$("*")

Tips and Comments

Tip:In practice, some browsers have slow processing speed when using *.