Design comparison
Solution retrospective
I tried to make it as responsive as possible. One question, how would you make the mobile menu tab also close when clicked on any other part of the screen? Any feedback would be great.
Community feedback
- @jgreen721Posted about 2 years ago
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 helpful1@RobertoBaiochiPosted about 2 years ago@jgreen721 Thank you very much! This helped me a lot, I'm going to start using events this way
1@jgreen721Posted about 2 years ago@RobertoBaiochi , awesome! always nice to occasionally suggest something useful! 🙂
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord