Skip to content

Commit

Permalink
update logic in handleyesclick function
Browse files Browse the repository at this point in the history
  • Loading branch information
sugoides committed Feb 13, 2024
1 parent 65bd254 commit f472012
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions will-you-be-my-valentine/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ function handleYesClick() {
titleElement.innerHTML = "Yayyy!! :3";
buttonsContainer.classList.add("hidden");
changeImage("yes");
setTimeout(window.location.href = '../flowers/', 5000)
setTimeout(function() {
window.location.href = '../flowers/';
}, 5000);

}

Expand Down Expand Up @@ -77,9 +79,7 @@ function changeImage(image) {
function updateNoButtonText() {
noButton.innerHTML = generateMessage(noCount);
}
function pauseScript() {
// Do nothing, script is effectively paused
}

document.addEventListener("DOMContentLoaded", function() {
preloadImages();
});

0 comments on commit f472012

Please sign in to comment.