Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Tip calculator app [Parcel/SASS/BEM]

@Lino-OTM

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi, this challenge took me some time to complete but I finished it with some help, but I got stuck with the reset btn, I couldn't figure out how to make it "disabled" when the values are $0.00 in the result section. (below / right) If anybody could help me I would be very grateful!

Community feedback

Joe-Praise 180

@Joe-Praise

Posted

You could go around it by

  • Writing an "if statement" to confirm if the state of both "Total field" innerHtml are === 0
  • If true, target the "reset button" and add CSS style "pointer-events: none" to the button. That should deactivate the button and if you want to change the background-color, you can easily do it within the same scope. also, you should make provision for when it's false(you toggle the CSS style). I'm yet to do mine though, but I hope this helps.🙂

Marked as helpful

0

Please log in to post a comment

Log in with GitHub
Discord logo

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