The elementRemoveClass() method searches the list of class names associated to the provided HTML DOM element and - if found - removes the specified CSS class name.

Syntax

bapi.helper.elementRemoveClass(el, sClassName)

Parameters

el

The HTML DOM element to remove the class from.

sClassName

The CSS class name that will be removed from the provided HTML DOM element.

Example

var elem = document.getElementById('foo');
console.log(elem);

bapi.helper.elementRemoveClass(elem, "new-cls-name");
console.log(elem);