Design comparison
Solution retrospective
I would like to ask for help with my Javascript solution. I have done listening on "click" and "keydown" to show the answers. I made switching between questions with "ArrowDown" and "ArrowUp", and opening the answer with "Enter". I also added a border to the current question selected with the key. When I switch only in one direction everything is OK, but if I want to change the direction of switching, the first step goes in the opposite direction than it should, then it is OK.
Please advise me what I could improve in my code, information on what I have done wrong. Thanks!
Community feedback
- @jotaprojectsPosted 8 months ago
I think you did really good job here. Giving the user a visual indicator what questions is active.
From what I see the top image is not fully responsive. It stops on larger screens. i think you can use some
background-size: contain;
magic. Try it out and see what you get.For the JavaScript you can think of not dublicate code, the so called DRY, Don't Repeat Yourself. But I would focus on getting things to work before refactor.
Keep up the good work!
0
Please log in to post a comment
Log in with GitHubJoin 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