How can I check if a user is clicking on a div called right-side-container and if they are remove the class of menu-opened.
toggleMenu() {
this.open = !this.open;
document.getElementsByTagName("html")[0].classList.toggle("menu-opened");
if (this.open) {
document.addEventListener("click", this.menuClickListener);
} else {
document.removeEventListener("click", this.menuClickListener);
}
},
menuClickListener($event) {
console.log($event);
},
},
};
// This is what I want to remove when the user is clicking the right-side-container
document.getElementsByTagName("html")[0].classList.remove("menu-opened");