js remove class

JavaScript
//remove a css class from an element
document.getElementById("myElementID").classList.remove("class_name"); const div =  document.querySelector('div') // Get element from DOM
div.classList.remove('info') // Remove class "info"document.getElementsByClassName("legend").style.display="none";$('#toggle li').on('click', function () {
    $(this).toggleClass('open')
});const removeClass = (element, name) => {
    const pattern = new RegExp('(?:^|\\s)'+ name + '(?:\\s|$)', 'g');
    element.className = element.className.replace(pattern, "");
};
Source

Also in JavaScript: