How to delete a class name code example
Example 1: how to remove an class in javascript
document.getElementsByClassName("legend").style.display="none";
Example 2: add and remove class in jquery
$('#toggle li').on('click', function () {
$(this).toggleClass('open')
});