@jgreen721
Posted
You can probably just attach a click event to the body that can check to see if the menu is displayed and if so, remove it. Just add an exit condition incase the user has clicked on the actual menu (ie if(e.target.classList.contains("open-icon-menu")return
)
Nice work on the page arrangement!
Marked as helpful
@RobertoBaiochi
Posted
@jgreen721 Thank you very much! This helped me a lot, I'm going to start using events this way
@jgreen721
Posted
@RobertoBaiochi , awesome! always nice to occasionally suggest something useful! 🙂