Submitted over 2 years ago
Responsive Tip Calculator using html css and js
@badgujarankush
Design comparison
SolutionDesign
Solution retrospective
Any feedback would be helpful.
Community feedback
- @tesla-ambassadorPosted over 2 years ago
Hey Ankush, Congrats on completing this solution. It's pretty solid and responsive. A few things I'd like to point out:
- You might want to start the calculations when the user has clicked one of the "select tip %" buttons or if the user enters an input on the "custom" input because it kind of makes some invalid calculations (when the bill or number of users is "0" which is meant to be an error). Inorder to solve this, you should execute the function that makes the calculations when the
click event
on the select tip % buttons is triggered or when theinput event
on the custom input is triggered. That should fix it. - To fix your HTML validation issue, you might want to add "#" to the
action
attribute so that it is not null. Happy Coding and keep up the good work!
1@badgujarankushPosted over 2 years ago@tesla-ambassador Thanks for the feedback, its really helpful. Will surely update my solution using your feedback. Really appreciate it.
0 - You might want to start the calculations when the user has clicked one of the "select tip %" buttons or if the user enters an input on the "custom" input because it kind of makes some invalid calculations (when the bill or number of users is "0" which is meant to be an error). Inorder to solve this, you should execute the function that makes the calculations when the
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