-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript.js
31 lines (27 loc) · 1.04 KB
/
script.js
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
const wrapper = document.querySelector(".wrapper");
const question = document.querySelector(".question");
const gif = document.querySelector(".gif");
const GoodBtn = document.querySelector(".Good-btn");
const BadBtn = document.querySelector(".Bad-btn");
const MehBtn = document.querySelector(".Meh-btn");
const AlmostBtn = document.querySelector(".Almost-btn");
GoodBtn.addEventListener("click", () => {
question.innerHTML = "Yay ^^!";
gif.src =
"https://media.giphy.com/media/UMon0fuimoAN9ueUNP/giphy.gif";
});
BadBtn.addEventListener("click", () => {
question.innerHTML = "Wish I was there to cuddle you :'(";
gif.src =
"https://media.giphy.com/media/U1fWij5wh8CMkDczUg/giphy.gif";
});
MehBtn.addEventListener("click", () => {
question.innerHTML = "Nooo, Cheer up!";
gif.src =
"https://media.giphy.com/media/jRknn339p7emYjUu3u/giphy.gif";
});
AlmostBtn.addEventListener("click", () => {
question.innerHTML = "Good job today!";
gif.src =
"https://media.giphy.com/media/5CnOzYQRSFnWw/giphy.gif";
});