jQuery .class selector
Definition and Usage
.class selector selects all elements with the specified class.
class reference class attribute of the HTML element.
class attribute is used to set a specific style for multiple HTML elements.
Note: Do not use the number at the beginning of the class attribute!It may be a problem in some browsers.
grammar
$(".class")
参数 | 描述 |
---|---|
class | 必需。规定要选取的元素的 class。 |
Try - Example
Select the class of "intro" all the elements p
How to select the class of "intro" all p elements.