From 7c264390983ae65d36143efc91464c9974a9f6af Mon Sep 17 00:00:00 2001 From: Andy Hubert Date: Thu, 1 Aug 2024 18:28:09 +0000 Subject: [PATCH] added back button --- yoseph/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yoseph/main.js b/yoseph/main.js index d75bb7c..e9e87f8 100644 --- a/yoseph/main.js +++ b/yoseph/main.js @@ -46,7 +46,7 @@ document.querySelector(`#savings-expense-enter`).addEventListener(`click`, () => document.querySelector(`#savings-total`).innerHTML = Savings document.querySelector(`#savings-expense-amount`).value = '' const savingsHistoryItem = { - description: document.querySelector(`#savings-expense-description`).value, + description: document.querySelector(`#savings-expense-description`).value, amount: SavingsSubtract, } History.push(savingsHistoryItem) @@ -90,4 +90,9 @@ document.querySelector(`#tithe-clear`).addEventListener(`click`, () => { document.querySelector(`#view-history`).addEventListener(`click`, () => { document.querySelector(`#screen-main`).classList.add(`hide`) document.querySelector(`#screen-history`).classList.remove(`hide`) +}) + +document.querySelector(`#back`).addEventListener(`click`, () => { + document.querySelector(`#screen-main`).classList.remove(`hide`) + document.querySelector(`#screen-history`).classList.add(`hide`) }) \ No newline at end of file