Accordion using basic HTML, CSS and JavaScript

Solution retrospective
I thought it would be easy to do it using the html details element and its name attribute, to make there always be only one item, but in Firefox there is no support for the name attribute in the details element... so I had to do it with javascript
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Grego's solution.
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