Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 2 years ago

Tip Calculator App with Vanilla JavaScript

accessibility, sass/scss
kxnzx•870
@kxnzx
A solution to the Tip calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello Frontend Mentor Gang!

It took me some time to finish this challenge. The calculator works, however the form does not function the way I want it to. Here are some of the issues:

  • The error message "Can't be zero" is displayed by default.
  • After the reset button has been clicked the value "0" stays set in place after typing in a new value.

My Questions:

  • How can I make the error message and the red focus on the input visible only after the tip percentage button or custom input have been filled in?
  • How do I make the value "0" dissapear when a new value is typed in after the reset button has been clicked?

Feel free to leave a comment if you've noticed some other issues. Much Appreciated!

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on kxnzx's solution.

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
Frontend Mentor logo

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License