jQuery Tutorial

jQuery removeClass() Method With Syntax and Example

Understanding removeClass method in jQuery

From the selected elements, removes one or more class names.

This method removes ALL class names from the selected elements if there is no specified parameter.

Syntax of removeClass method in jQuery

$(selector).removeClass(classname,function(index,currentclass))

Example of jQuery removeClass method

Remove the "intro" class from all

elements:

 

$("button").click(function(){
  $("p").removeClass("intro");
});
Did you find this article helpful?