![](https://res.cloudinary.com/dz209s6jk/image/upload/f_auto,q_auto,w_900/Screenshots/jwefqozfyg1iavwwxm4r.jpg)
Design comparison
Solution retrospective
Hey everyone!
This is my first challenge using javascript and I struggled a lot with making accordions collapse on click before finally making it work. I would like to improve some things though -
-
I have made it such that one accordion will always remain uncollapsed, otherwise the background pattern breaks (and it also looks nice with one accordion open). But there seems to be a little bug. When you click on an accordion that is already open, it plays a ping-pong like animation. I want it to be still and do nothing. How can I achieve this? I tried using
if
statements but it didn't work. -
On desktop mode, how to cut-off the portion that is out of the container? I used
overflow: hidden
but it also cuts-off the box on top of it, which didn't look good.
Any feedback is appreciated. Thank you!
Community feedback
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