-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.js
86 lines (76 loc) · 2.28 KB
/
main.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
const all = document.querySelector("#all");
const gangnam = document.querySelector("#gangnam");
const dong_gangnam = document.querySelector(".dong-gangnam");
const mapo = document.querySelector("#mapo");
const dong_mapo = document.querySelector(".dong-mapo");
const songpa = document.querySelector("#songpa");
const dong_songpa = document.querySelector(".dong-songpa");
const yongsan = document.querySelector("#yongsan");
const dong_yongsan = document.querySelector(".dong-yongsan");
const jongro = document.querySelector("#jongro");
const dong_jongro = document.querySelector(".dong-jongro");
gangnamcnt=0;
gangnam.addEventListener('click', ()=>{
if (gangnamcnt === 0){
if (jongrocnt===1 || songpacnt===1 || yongsancnt===1 || mapocnt===1);
else{
dong_gangnam.style.display = 'initial';
gangnamcnt=1;
}
} else{
dong_gangnam.style.display = 'none';
gangnamcnt=0;
}
});
mapocnt=0;
mapo.addEventListener('click', ()=>{
if (mapocnt === 0){
if (gangnamcnt===1 || songpacnt===1 || yongsancnt===1 || jongrocnt===1);
else {
dong_mapo.style.display = 'initial';
mapocnt=1;
}
} else{
dong_mapo.style.display = 'none';
mapocnt=0;
}
});
songpacnt=0;
songpa.addEventListener('click', ()=>{
if (songpacnt === 0){
if (gangnamcnt===1 || jongrocnt===1 || yongsancnt===1 || mapocnt===1);
else {
dong_songpa.style.display = 'initial';
songpacnt=1;
}
} else{
dong_songpa.style.display = 'none';
songpacnt=0;
}
});
yongsancnt=0;
yongsan.addEventListener('click', ()=>{
if (yongsancnt === 0){
if (gangnamcnt===1 || songpacnt===1 || jongrocnt===1 || mapocnt===1);
else {
dong_yongsan.style.display = 'initial';
yongsancnt=1;
}
} else{
dong_yongsan.style.display = 'none';
yongsancnt=0;
}
});
jongrocnt=0;
jongro.addEventListener('click', ()=>{
if (jongrocnt === 0){
if (gangnamcnt===1 || songpacnt===1 || yongsancnt===1 || mapocnt===1);
else {
dong_jongro.style.display = 'initial';
jongrocnt=1;
}
} else {
dong_jongro.style.display = 'none';
jongrocnt=0;
}
});