Replaces a custom CSS class of an element with a different custom CSS class.
The replace()
function replaces a custom CSS class of an element with a different custom class.
If the currentClassName
is not one of the element's classes, the element's class list is not affected.
Returns true
if the replacement is successful.
The custom class to replace.
The new class to add.