how to set and remove a class using javascript code example
Example: how to remove an class in javascript
document.getElementsByClassName("legend").style.display="none";
document.getElementsByClassName("legend").style.display="none";