Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

jQuery Multiple Element Selector

jQuery Multiple Element Selector

jQuery selector jQuery selector

Example

Select all

,
and element:

$("h2,div,span")

Try it »


Definition and Usage

element The selector can be used to select multiple elements.

**Note:** Separate each element with a comma.


Syntax

$("

element1,element2,element3,...

")

Parameters Description
element Required. Specifies the element to select.

Try it - Example

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


jQuery selector jQuery selector