Submitted over 1 year agoA solution to the FAQ accordion card challenge
Accordion responsive menu using javascript
@Federico-Salerno

Solution retrospective
I created the accordion menu by adding and removing the 'active' class using classList methods like classList.remove or classList.add. Also use classList.toggle to make the 'active' class dynamic. This accordion menu can be made directly from HTML using the <details>
and <summary>
tags that allow the text within <summary>
to be displayed:
details>
<summary>How many team members can I invite?</summary>
<p>You can invite up to 2 additional users on the Free plan. There is no
limit on team members for the Premium plan.</p>
</details>
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Federico Salerno'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