Home > Article > Web Front-end > How to remove classes in jquery
Jquery method to remove classes: 1. Create a new html file; 2. Create a new div and add a class class and text content; 3. Create a new button and add a click event; 4. Introduce the jQuery library; 5. Create Just remove the class event with one click.
The operating environment of this article: Windows 7 system, jquery version 3.2.1, DELL G3 computer
How to remove the jquery class?
jQuery remove class:
Open the html editor and create a new html file. As shown in the figure
Find
on the html code page and create a newCode:
Create a new click button after
Code:
## Set class style. Set a style for remark with a font size of 28px and a color of red. As shown in the picture: Code:<style> .remark{ font-size: 28px;color: red; } </style>Introducing the jQuery library. Introduce the jquery library after the
The above is the detailed content of How to remove classes in jquery. For more information, please follow other related articles on the PHP Chinese website!