Removes the given class from element. In contrast to element.classList.remove(...) it also ensures to remove the class attribute, if empty.
element.classList.remove(...)
class
May be used to clean up class-attribute providing no tokens at all.
element to remove class from
Rest
class names to remove
Removes the given class from element. In contrast to
element.classList.remove(...)
it also ensures to remove theclass
attribute, if empty.May be used to clean up class-attribute providing no tokens at all.