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

HTML CSS JS

@asadLjerry

Desktop design screenshot for the FAQ accordion card coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I made the questions to show the hidden content upon click but I messed up with the closing part. i couldnt figure out where the problem is :(. NEED help in this, first time played with JS. There`s a lot and a lot to improve and I'll get there soon. THANKYOU.

Community feedback

@MojtabaMosavi

Posted

  • The bug cusing the question not to close is caused by the inline <div class="accordion_collapse collaspe" style:"display:block;"> . The functionality that you are tring to implement is:

    • 1 if button clicked display the answer
    • 2 if the button gets clicked again hide the answer
    • 3 if any other question clicked hide the current one that' You've already the code for 1 and 2 if you revome that line the set the inline style in js.  
  • Spend some time reading about the mobile frist workflow because it makes it easier to develop responsive applications. Keep coding :=)

Marked as helpful

1

@asadLjerry

Posted

@MojtabaMosavi THANKYOU!

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