javascript to update a div by class value code example
Example: javascript change element class
//Overwrite all classes
element.className = "class";
//Add class
element.classList.add("class");
//Overwrite all classes
element.className = "class";
//Add class
element.classList.add("class");