Responsive design for FAQ accordion using HTML,CSS and JS

Solution retrospective
Working with JavaScript. Doing the functionality by traversing through DOM elements.
What challenges did you encounter, and how did you overcome them?I was not able hide/unhide the elements on the first click every time after I refresh the page. This was happening because JS only reads the inline styles. I overcame it by using getComputedStyle() in JS, it is used to check the computed style of an element which is written externally.
What specific areas of your project would you like help with?Feedback on simpler ways of writing the JavaScript and making the page more responsive would be helpful :)
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Subaga'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