Remove All classes From Div

http://api.jquery.com/removeClass/

If a class name is included as a parameter, then only that class will be removed from the set of matched elements. If no class names are specified in the parameter, all classes will be removed.


You can use removeClass without using any class as a parameter.

Description: Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

Like:

$(this).removeClass();

You can use .attr('class','') to remove all classes from any element.

Example:

$(this).attr('class','')

You don't need to wrap this in a jQuery selector to complete this job.

To remove all classes from the element

this.className = '';

Tags:

Css

Jquery