Example

Select all elements inside <body>:

$("body *")

Try it yourself »

Definition and Usage

The * selector selects every single element in the document, including html, head and body.

If used together with another element (nested selectors, like in the example above), it selects all child elements within the specified element.

Syntax

$("*")


Tips and Notes

Tip: Depending on use, the * can be slow, and heavy for some browsers to process.


Examples

Try it Yourself - Examples

Select all elements
Use the * selector to select all elements in a document.