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

Submitted

FAQ Accordion

mcorusa 210

@mcorusa

Desktop design screenshot for the FAQ accordion coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

Branimir 240

@brane10

Posted

Hello, very good. I would recommend you to add some transition when opening and closing, to make it a little slower. And you could also optimize the logic in javascript using the ternary operator instead "if":

const imageSource = answer.classList.contains("hidden") ? "assets/images/icon-plus.svg" : "assets/images/icon-minus.svg";
btn.lastElementChild.setAttribute("src", imageSource);

I love your work :D

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