FAQ-accordion-card with HTML CSS JS

Solution retrospective
I want to Improve my skills, Feedbacks are always welcome <3
Please log in to post a comment
Log in with GitHubCommunity feedback
- @grace-snow
Hi
There are a few big suggestions for this
-
Look up how to make accessible collapsible sections. A hint is that you should only have event listeners on interactive html elements like buttons/anchor tags
-
Only add event listeners to the elements you need to listen to, not the whole document
-
Use javascript to toggle classes, don't mess with styles in the js. This would usually be about 2-3 lines of js for this challenge, not all that you've got here
Good luck
-
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