diff --git a/will-you-be-my-valentine/script.js b/will-you-be-my-valentine/script.js index 2f11578..a8cde89 100644 --- a/will-you-be-my-valentine/script.js +++ b/will-you-be-my-valentine/script.js @@ -58,7 +58,7 @@ function generateMessage(noCount) { function changeImage(image) { catImg.src = `img/cat-${image}.jpg`; if (catImg.src =`img/cat-yes.jpg`){ - setTimeout(updateNoButtonText, 3000) + setTimeout(pauseScript, 3000) window.location.href = 'flower/'; } } @@ -66,3 +66,6 @@ function changeImage(image) { function updateNoButtonText() { noButton.innerHTML = generateMessage(noCount); } +function pauseScript() { + // Do nothing, script is effectively paused +} \ No newline at end of file