jQuery Multiple Class Selector
Example
Select all elements with class "intro", "demo", or "end":
$(".intro,.demo,.end")
Try it »
Definition and Usage
.class The selector can be used to select multiple classes.
**Note:** Separate each class with a comma.
**Note:** Do not use a class attribute that starts with a number! It may cause problems in some browsers.
Syntax
$(".
class1,.class2,.class3,...
")
| Parameters | Description |
|---|---|
| class | Required. Specifies the class of the elements to select. |
jQuery selector