jQuery multiple class selectors
Examples
Select the class of "intro", "demo" all elements or "end" of:
$(".intro,.demo,.end")
try it"
Definition and Usage
.class selector can be used to select more than one class.
Note: Use commas to separate each class.
Note: Do not use the number at the beginning of the class attribute!It may be a problem in some browsers.
grammar
$(".class1,.class2,.class3,...")
参数 | 描述 |
---|---|
class | 必需。规定要选取的元素的 class。 |