Skip to content

Commit d725cdf

Browse files
authored
Create script.js
1 parent aecfc36 commit d725cdf

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

script.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const yesBtn = document.getElementById("yesBtn");
2+
const noBtn = document.getElementById("noBtn");
3+
const container = document.getElementById("container");
4+
5+
let yesSize = 1;
6+
7+
noBtn.addEventListener("click", () => {
8+
yesSize += 0.3;
9+
yesBtn.style.transform = `scale(${yesSize})`;
10+
});
11+
12+
yesBtn.addEventListener("click", () => {
13+
container.innerHTML = `
14+
<h1>I knew you’d say YES! 💖</h1>
15+
<img src="https://media.giphy.com/media/26FLdmIp6wJr91JAI/giphy.gif"
16+
style="width:300px; margin-top:20px;">
17+
`;
18+
});

0 commit comments

Comments
 (0)