Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Desktop design screenshot for the FAQ accordion coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


What are you most proud of, and what would you do differently next time?

This mini project was my first project in Frontend Mentor that uses JavaScript, and I solved the problem. This is amazing

What challenges did you encounter, and how did you overcome them?

I got a little stuck in implementing the Hide/Show the answers, but after googling, I overcame it.

What specific areas of your project would you like help with?

I want feedback on implementing the toggle of plus and minus icons. For now, if you click on an answer it hides the other answers and can't make the icons pluses, Do you have any feedback on it?

Community feedback

@LeviKuhaulua

Posted

Howzit, for this segment of code:

document.querySelectorAll('.answer').forEach(a => {
    if (a !== answer) {
       a.classList.add('hide')
    }
})

Every time you click on a question, it is going to reapply the hide class to all of the other questions even if they were clicked on by the user previously. By removing this segment of code, it will allow the user to see the answers to all the questions.

Hopefully this helped and happy coding!

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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