From bc709291818ce7ba392d9f24250ec202802a8032 Mon Sep 17 00:00:00 2001 From: VIVEK SATI Date: Sun, 16 Jul 2023 11:31:44 +0530 Subject: [PATCH] fix: button works on single click --- shlok_page/motivation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shlok_page/motivation.js b/shlok_page/motivation.js index f6fdb172..324cb296 100644 --- a/shlok_page/motivation.js +++ b/shlok_page/motivation.js @@ -204,7 +204,8 @@ const genQuote = () => { front = !front; }; -genQuote(); +var newQuoteButton = button[0]; +newQuoteButton.addEventListener('click', genQuote); function newQuote() { // Rotating the Quote Box blockBack.classList.toggle('rotateB');