jQuery Multiple Element 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.
$("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