Instead of individually calling $("#item").removeClass()
for every single class an element might have, is there a single function which can be called which removes all CSS classes from the given element?
Both jQuery and raw JavaScript will work.
转载于:https://stackoverflow.com/questions/1424981/how-to-remove-all-css-classes-using-jquery