Home >Web Front-end >JS Tutorial >How to remove css attributes in jquery

How to remove css attributes in jquery

青灯夜游
青灯夜游Original
2021-05-13 16:54:353026browse

Jquery method to remove css attributes: 1. Use the css() method, the syntax format is "$(selector).css('property name','')"; 2. Use the remove() method, the syntax Format "$(selector).remove('class')".

How to remove css attributes in jquery

The operating environment of this tutorial: windows7 system, jquery1.10.0 version, Dell G3 computer.

jquery removes css attributes

For deletion of css attributes in elements:

$.css('width','')

For the deletion of css attributes in the style style

$.remove('class')

Recommended related video tutorials: jQuery tutorial (video)

The above is the detailed content of How to remove css attributes in jquery. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn