Erel Ropeta• 385
@ereljapco
Posted
Hello!
- You can wrap the dollar sign and the input element in a container. And add styles to it :)
<div class="bill__input-container">
<p class="bill__dollar-sign">$
<input class="bill__input" />
</div>
- You're currently using
tipchoosen
, which is a nodelist, to get the value of the button clicked.tipchoosen.value
returnsundefined
. Instead, use theevent.target
to get the value.
Some things I noticed that you could look into:
- 50% tip button's value was set to 0.25
NaN
is appearing whenbillVal
is empty. You can add anif
condition so you can set a value to billVal if it becomes empty.
Marked as helpful
0