Remove all CSS classes using jQuery?

jquery

Instead of individually calling $("#item").removeClass() for every single class an element might have, there is a single function which can be called which removes all CSS classes from the given element?

$("#item").removeClass();

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


Leave a Reply

Your email address will not be published. Required fields are marked *