remove class from classlist javascript code example
Example 1: javascript clear classList
element.classList.remove(...element.classList);
Example 2: how to remove an class in javascript
document.getElementsByClassName("legend").style.display="none";