The elementAddClass()
method adds the specified CSS class name to the specified HTML DOM element.
bapi.helper.elementAddClass(el, sClassName)
el
The HTML DOM element to add the class to.
sClassName
The CSS class name that will get added to the provided HTML DOM element.
var elem = document.getElementById('foo');
console.log(elem);
bapi.helper.elementAddClass(elem, "new-cls-name");
console.log(elem);