Design comparison
SolutionDesign
Solution retrospective
This is my solution for the challenge still missing 2 things:
- Button/Div of 5%,10% etc when clicked need to change color indicating that it's showing 5%(see designs), i know the css class can be used to change with JS but i cannot understand how to revert it(if another percent like 15% is selected it needs to change color but the previous 5% should change back to it's previous color), i can't figure out how to do it.
- Reset button should be disabled when there is no input given, i don't know how to check changes for each input and switch between enabled and disabled.
Community feedback
- @denieldenPosted almost 3 years ago
Hi Nishant,
you can use an
.active
class to add and remove via javascript. On click, add the class to the event target and remove it from all other buttons.Read here:
Happy coding :)
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