-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbutton_cmpt.js
26 lines (26 loc) · 1.03 KB
/
button_cmpt.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
document.getElementById("KW_button").addEventListener("click", show_manga_KW);
var button_on_off = 0;
function show_manga_KW(){
if(button_on_off==0){
document.getElementById("KW_saying").style.opacity = "1" ;
document.getElementById(`KW_saying`).style.padding = "5vh 0";
document.getElementById(`KW_saying`).style.height = "auto";
for (i=1; i<11; i++){
document.getElementById(`KW${i}`).style.padding = "2vh 0";
document.getElementById(`KW${i}`).style.opacity = "1" ;
document.getElementById(`KW${i}`).style.height = "auto" ;
}
button_on_off=1;
}
else if(button_on_off==1){
document.getElementById("KW_saying").style.opacity = "0" ;
document.getElementById(`KW_saying`).style.padding = "0";
document.getElementById(`KW_saying`).style.height = "0" ;
for (i=1; i<11; i++){
document.getElementById(`KW${i}`).style.padding = "0";
document.getElementById(`KW${i}`).style.opacity = "0" ;
document.getElementById(`KW${i}`).style.height = "0" ;
}
button_on_off=0;
}
}