dynamically change class code example
Example: dynamically change class
document.getElementById('idOfElement').className = 'newClassName';
// += to keep existing classes
document.getElementById('idOfElement').className = 'newClassName';
// += to keep existing classes