Intro section with dropdown navigation w/ TailwindCSS

Solution retrospective
🤔I wonder how to make other dropdown close when I click one dropdown, and thank you!!😊
Please log in to post a comment
Log in with GitHubCommunity feedback
- @WickedSoul-17
your dropdown is working on click, Try to use :Hover pseudo code on the element . other wise you can also use focus pseudo code.
- @rymnddev
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!)
- @MunBrian
I used mouse over/out event instead of the click event in my solution and it works fine.
- @Thesaleem
I had same issues too but I guess it's something we are missing in the DOM manipulation.
Join 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