-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathemoji.js
121 lines (112 loc) · 3.85 KB
/
emoji.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
var showCard = document.querySelectorAll('.fas');
var Eyecard = document.getElementById('eyes-card');
var Skincard = document.getElementById('skin-card');
var mouthCard = document.getElementById('mouth-card');
showCard.forEach(function(show){
show.addEventListener('click',function(){
if(show.classList.contains('show-eyes-card'))
{
Eyecard.style.display="block";
Skincard.style.display="none";
mouthCard.style.display="none";
}
else if(show.classList.contains('show-mouth-card'))
{
Eyecard.style.display="none";
Skincard.style.display="none";
mouthCard.style.display="block";
}
else if(show.classList.contains('show-skin-card'))
{
Eyecard.style.display="none";
Skincard.style.display="block";
mouthCard.style.display="none";
}
})
});
var greenSkin = document.getElementById('green-skin');
var redSkin = document.getElementById('red-skin');
var yellowSkin = document.getElementById('yellow-skin');
var Skin = document.getElementById('skin');
var Eyes = document.getElementById('eyes');
var Mouth = document.getElementById('mouth');
greenSkin.addEventListener('click',function(){
Skin.src="./assets/green.png";
Eyecard.style.display="block";
Skincard.style.display="none";
mouthCard.style.display="none";
});
redSkin.addEventListener('click',function(){
Skin.src="./assets/red.png";
Eyecard.style.display="block";
Skincard.style.display="none";
mouthCard.style.display="none";
});
yellowSkin.addEventListener('click',function(){
Skin.src="./assets/yellow.png";
Eyecard.style.display="block";
Skincard.style.display="none";
mouthCard.style.display="none";
});
var laughing = document.getElementById('eye-laughing');
var long = document.getElementById('eye-long');
var normal = document.getElementById('eye-normal');
var winking = document.getElementById('eye-winking');
var rolling = document.getElementById('eye-rolling');
var closing= document.getElementById('eye-closed');
laughing.addEventListener('click',function(){
Eyes.src="./assets/laughing.png";
Eyecard.style.display="none";
Skincard.style.display="none";
mouthCard.style.display="block";
});
long.addEventListener('click',function(){
Eyes.src="./assets/long.png";
Eyecard.style.display="none";
Skincard.style.display="none";
mouthCard.style.display="block";
});
normal.addEventListener('click',function(){
Eyes.src="./assets/normal.png";
Eyecard.style.display="none";
Skincard.style.display="none";
mouthCard.style.display="block";
});
winking.addEventListener('click',function(){
Eyes.src="./assets/winking.png";
Eyecard.style.display="none";
Skincard.style.display="none";
mouthCard.style.display="block";
});
rolling.addEventListener('click',function(){
Eyes.src="./assets/rolling.png";
Eyecard.style.display="none";
Skincard.style.display="none";
mouthCard.style.display="block";
});
closing.addEventListener('click',function(){
Eyes.src="./assets/closed.png";
Eyecard.style.display="none";
Skincard.style.display="none";
mouthCard.style.display="block";
});
var Open = document.getElementById('mouth-open');
var sad = document.getElementById('mouth-sad');
var smiling = document.getElementById('mouth-smiling');
var straight = document.getElementById('mouth-straight');
var teeth = document.getElementById('mouth-teeth');
Open.addEventListener('click',function(){
Mouth.src="./assets/open.png";
});
sad.addEventListener('click',function(){
Mouth.src="./assets/sad.png";
});
smiling.addEventListener('click',function(){
Mouth.src="./assets/smiling.png";
});
straight.addEventListener('click',function(){
Mouth.src="./assets/straight.png";
});
teeth.addEventListener('click',function(){
Mouth.src="./assets/teeth.png";
});