Skip to content

Commit

Permalink
added event listener
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyHubert committed Jul 18, 2024
1 parent 2453198 commit c993c7b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion yoseph/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,21 @@ let StupidSubtract = document.querySelector(`#stupid-expense-amount`).value
let PayAmount = document.querySelector(`#pay-amount`).value

document.querySelector(`#savings-expense-enter`).addEventListener(`click`, () => {
alert('oooooooooooooh yeaaaaaaaaaaa')
SavingsSubtract = document.querySelector(`#savings-expense-amount`).value
Savings = Savings - SavingsSubtract
document.querySelector(`#savings-total`).innerHTML = Savings
})

document.querySelector(`#pay-enter`).addEventListener(`click`, () => {
PayAmount = document.querySelector(`#pay-amount`).value
PayAmount = Number(PayAmount)
Savings = Savings + PayAmount
document.querySelector(`#savings-total`).innerHTML = Savings
document.querySelector(`#pay-amount`).value = ''
})

document.querySelector(`#stupid-expense-enter`).addEventListener(`click`, () => {
})

document.querySelector(`#title-clear`).addEventListener(`click`, () => {
})

0 comments on commit c993c7b

Please sign in to comment.