-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
38 lines (31 loc) · 1.09 KB
/
script.js
File metadata and controls
38 lines (31 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const asnwerOptions = document.querySelector(".answer-options");
const yesButton = document.querySelector("button.yes");
const noButton = document.querySelector("button.no");
let cont = 1;
noButton.addEventListener("click", () => {
cont++;
asnwerOptions.style.setProperty("--multiplier", cont);
});
yesButton.addEventListener("click", () => {
cont = 1;
asnwerOptions.style.setProperty("--multiplier", cont);
const title = document.querySelector(".title");
title.textContent = "Gracias por ser mi san valentín!!! ⸜(。˃ ᵕ ˂ )⸝♡";
const videoGif = document.querySelector(".video-gif");
videoGif.setAttribute("src", "https://media4.giphy.com/media/v1.Y2lkPTc5MGI3NjExY3p2YWd6NjNwN2FtcHp6ZW0wanJmMnJnd3RiNHlpNGV5bjBmb3dxZCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/tHIRLHtNwxpjIFqPdV/giphy.gif");
asnwerOptions.remove();
import("https://cdn.jsdelivr.net/npm/canvas-confetti@0.0.3/dist/confetti.browser.min.js")
.then(() => {
confetti({
particleCount: 300,
spread: 200,
origin: {
y: 0.6
}
});
});
},
{
once: true
}
);