How can I remove all CSS classes using jQuery/JavaScript?


Calling removeClass with no parameters will remove all of the item’s classes.

You can also use (but it is not necessarily recommended. The correct way is the one above):

$("#item").attr('class', '');

If you didn’t have jQuery, then this would be pretty much your only option:


Leave a Comment