jquuery remove by class code example
Example 1: jquery remove and add class
$( "#foo" ).toggleClass( 'className', addOrRemoveOptional );
//OR
if ($( "#foo" ).hasClass('className')) {
$( "#foo" ).removeClass( 'className');
} else {
$( "#foo" ).addClass( 'className');
}
Example 2: jquery remove multiple classes
$("element").removeClass("class1 class2");
//One or more CSS classes to remove from the elements,
//these are separated by spaces.
Example 3: jquery remove multiple class
$("p").removeClass("blue under");