Design comparison
SolutionDesign
Solution retrospective
Happy to finish this project. I am really glad I thought of a neat and short way on how to make the tip % button work. I didn't apply function call on each button but did it in a different way.
Feedback are appreciated.
Community feedback
- @DonUggioniPosted about 2 years ago
Hey there,
To use the custom input, you need to add an eventListener to it and listen to events on every key stroke for example, then add some conditions to your code saying that if custom tip is selected, use that value to calculate the tip, otherwise, use the button values to calculate the tip value.
Hope it helps!
Marked as helpful0
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