how to change css class using javascript code example
Example 1: dynamically change css class with javascript
document.getElementById('idOfElement').classList.add('newClassName');
Example 2: how to change css using javascript
document.getElementById("myText").className = "anyNewClass"