Category: Class Attribute

Category: Class Attribute

These methods inspect and manipulate the CSS classes assigned to elements.

.addClass()

Adds the specified class(es) to each element in the set of matched elements.

.hasClass()

Determine whether any of the matched elements are assigned the given class.

.removeClass()

Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

.toggleClass()

Add or remove one or more classes from each element in the set of matched elements, depending on either the class’s presence or the value of the state argument.

© The jQuery Foundation and other contributors
Licensed under the MIT License.
https://api.jquery.com/category/manipulation/class-attribute

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部