B DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

jQuery multiple classes Selector

jQuery Selectors jQuery Selectors

Example

Select all elements with class "intro", "demo" or "end":

$(".intro, .demo, .end")
Try it yourself »

Definition and Usage

The .class selector can likewise be utilized to choose various classes.

Note: Seperate each class with a comma.

Note: Do not begin a class property with a number. It might cause issues in some browsers.


Syntax

$(".class1,.class2,.class3,...")

Parameter Description
class Required. Determines the class of the components to select

jQuery Selectors jQuery Selectors