-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
59 lines (57 loc) · 2.66 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const Iya = document.querySelector(".next");
const Text = document.getElementById("text");
const Image = document.querySelector("#image-gif");
Iya.addEventListener("click", function () {
Iya.value = parseInt(Iya.value) + 1;
Text.classList.remove('text-animate');
if (Iya.value == 1) {
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "Halo ini saya Ikhwan!!";
Text.classList.add('text-animate');
}else if (Iya.value == 2) {
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "Saya mohon maaf jika ada salah";
Image.setAttribute("src", "https://c.tenor.com/uygoMR-ATWgAAAAj/happy-ied-mubarak-ied-mubarak.gif");
Text.classList.add('text-animate');
}else if (Iya.value == 3) {
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "Berbuat khilaf adalah sifat";
Text.classList.add('text-animate');
}else if (Iya.value == 4) {
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "Meminta maaf adalah kewajiban";
Text.classList.add('text-animate');
}else if (Iya.value == 5) {
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "Dan kembalinya fitrah adalah tujuan";
Text.classList.add('text-animate');
}else if (Iya.value == 6) {
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "Di hari fitri ini mohon maaf lahir dan batin";
Text.classList.add('text-animate');
}else if (Iya.value == 7) {
Image.setAttribute("src", "https://c.tenor.com/T_16HTs34x4AAAAj/taqabbal-allahu-minna-wa-minkum-accept-god-with-us-and-you.gif");
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "تَقَبَّلَ اللَّهُ مِنَّا وَمِنْكُمْ وَ تَقَبَّلْ ياَ كَرِيْمُ <br> Taqabbalallahu Minna Wa Minkum";
Text.classList.add('text-animate');
}else if (Iya.value == 8) {
Image.setAttribute("src", "https://c.tenor.com/57JSPYRo0k8AAAAj/lebaran-selamat-lebaran.gif");
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "Selamat hari raya Idul Fitri 1443 Hijriah!!";
Text.classList.add('text-animate');
}else if(Iya.value == 9){
Text.classList.remove('text-animate');
void Text.offsetWidth;
Text.innerHTML = "Tetaplah memperhatikan protokol kesehatan!";
Text.classList.add('text-animate');
Iya.remove();
}
});