jQuery Remove Class From HTML Elements Example

Today, We want to share with you jquery remove class.In this post we will show you jquery add removes class onclick, hear for jquery add all class we will give you demo and example for implement.In this post, we will learn about jQuery removeClass Method with an example.

How to use removeClass() method in jQuery?

Example 1: index.html

Welcome To Pakainfo.com

Pakainfo - Web Development & Good Online education

This is Web Development & Good Online education Tutorials.

addClass and removeClass in jQuery


posted 20 Jan 14


Story Title

Egestas eros ac risus faucibusr


jQuery Code

$(document).ready(function() {   
    $(".close_button").click(function (e) { 

    $(".clickable").click(function () {
        if ($(this).hasClass("spot")){

CSS Code

.spot {
    background: #AAA;

.grown {
    background: #0A0;

.close_button {
    display: none;

.grown .close_button {
    display: inline;

Example 3: Usage of .removeClass()

$("button").click(() => {

Example 4: No argument


Example 5: Space separated list as an argument


Removing all classes





Space separated list as an argument




Function as an argument




I hope you get an idea about jQuery Get and Set CSS Classes.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment