Design comparison
Solution retrospective
🤔I wonder how to make other dropdown close when I click one dropdown, and thank you!!😊
Community feedback
- @WickedSoul-17Posted over 2 years ago
your dropdown is working on click, Try to use :Hover pseudo code on the element . other wise you can also use focus pseudo code.
0 - @king-oldmatePosted over 2 years ago
There are ways of doing it, and event delegation would probably be the most efficient method, but since there aren't that many dropdown menus, all you need to do is code it so that no matter what menu item you click, it will:
- hide every other menu
- reveal the menu that was clicked.
Hope that made sense! (Just experiment with it!)
0 - @MunBrianPosted over 2 years ago
I used mouse over/out event instead of the click event in my solution and it works fine.
0 - @ThesaleemPosted over 2 years ago
I had same issues too but I guess it's something we are missing in the DOM manipulation.
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