front-end-mentor-Pricing-component-with-toggle

Solution retrospective
Hi, it's been a while since I uploaded a solution. Basically, I've relearned JavaScript all over again because there were many concepts that I still didn't understand, especially in terms of logic. I know the syntax, but I'm unsure how and when to apply it, so my confidence has taken a hit. Of course, I don't mean to give up, but I'm a slow learner, and it took me a long time to complete this task. I hope everyone can give me some valuable advice. It would be even better if someone could guide me in the right direction. Thanks again, @Eileenpk, I borrowed some of her code for inspiration :)
Please log in to post a comment
Log in with GitHubCommunity feedback
- @baldwinboy
Great work! I'd recommend listening to the "change" event on the input switch rather than the design, as done in the commented-out code, as well as placing the styling on the checkbox/:checked state rather than pseudo-elements. Not only does this save you from having to manage conditional logic, but also makes the site more accessible for users.
Marked as helpful
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