CSS Classes API
cls.remove()
Removes the passed CSS classes from the matched DOM elements.
- Accepts arguments as strings and arrays of strings.
You can pass CSS classes as individual arguments, as an array, or as a string separated by commas or spaces.
Each value is seen as a new argument. - If no arguments are passed, it removes all CSS classes from the matched DOM elements.
Example:
$('div ?').cls.remove();
// Removes all CSS classes from all <div> elements.
$('div ?').cls.remove('book');
// Removes the CSS class 'book' from all <div> elements.
$('div ?').cls.remove('book', 'cat');
// Removes the CSS classes 'book' and 'cat' from all <div> elements.
$('body').cls.remove('book', 'cat');
$('body').cls.remove(['book', 'cat']);
$('body').cls.remove('book, cat');
$('body').cls.remove('book cat');
// Removes the CSS classes 'book' and 'cat' from the <body> element.