FAQ Accordion Card using HTML, CSS, and JS

Solution retrospective
Any suggestions on improving the code would be appreciated!
Please log in to post a comment
Log in with GitHubCommunity feedback
- @JulienLEUILLIER
Really nice solution, with responsiveness on the mobile layout !
You can use
classList.toggle
to actually add and remove the.active
class in your script, to save a few lines.Keep up the good job !
Marked as helpful
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