Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ yesBtn.addEventListener("click", () => {
question.innerHTML = "Yay, see you on the 18th!";
gif.src =
"https://media.giphy.com/media/UMon0fuimoAN9ueUNP/giphy.gif";
// this will hide the "No" button after you click "Yes"
noBtn.style.display = "none";
// this will center the "Yes" button when the "No" button is hidden
yesBtn.style.margin = "0 auto";
});

noBtn.addEventListener("mouseover", () => {
Expand All @@ -20,4 +24,4 @@ noBtn.addEventListener("mouseover", () => {

noBtn.style.left = randomX + "px";
noBtn.style.top = randomY + "px";
});
});