Design comparison
SolutionDesign
Solution retrospective
I learned how to make a working toggle switch with this challenge!
To animate the changing of prices, I used the transform
attribute.
My script observes the keydown
event when the toggle is focused. The toggle then works by pressing the spacebar or enter key.
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