
Design comparison
Solution retrospective
I'm really proud of two things:
- The slider
- The lightbox design
I think writing cleaner code would be very beneficial in the future.
What challenges did you encounter, and how did you overcome them?I think the main challenge I encountered was the positioning of the cart. For some reason, it would only go as far as the middle of the page.
So to tackled that I learned a little about position and I was able to solve it after that.
Another challenge that I faced was that whenever I would click an image in the lightbox the lightbox would close. In order to tackle that I put the following code if(e.target !== e.currentTarget) return
in the addEventListener
for the lightbox.
I would really like some help with how I chose the elements in JavaScript. Do you guys think that was the only way to do it or is there a better and cleaner way to go about it? Maybe create a new .js
file and get them as objects?
Community feedback
- @jonathanudehPosted 4 months ago
Based on how your coded is structured I think using if(e.target !== e.currentTarget) return for the solution was a good choice. overall you did a very good job.
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