forked from yatulearn/yatulearn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyatu_learn_script.js
125 lines (117 loc) · 3.82 KB
/
yatu_learn_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
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
122
123
124
125
let nav=document.querySelector("nav");
let btnh=document.querySelector(".btn-home");
let btnq=document.querySelector(".qp");
let btnn=document.querySelector(".btn-notes");
let btna=document.querySelector(".btn-about");
window.addEventListener("scroll",function() {
if(window.scrollY>0){
nav.classList.add("change");
btnh.classList.add("change_btn");
btnq.classList.add("change_btn");
btnn.classList.add("change_btn");
btna.classList.add("change_btn");
}else{
nav.classList.remove("change");
btnh.classList.remove("change_btn");
btnq.classList.remove("change_btn");
btnn.classList.remove("change_btn");
btna.classList.remove("change_btn");
}
})
// Roadmap
let btnw=document.querySelector(".btn_web");
let btnd=document.querySelector(".btn_dsa");
let btnc=document.querySelector(".btn_cs");
let btnai=document.querySelector(".btn_ai");
let btnos=document.querySelector(".btn_os");
let btncn=document.querySelector(".btn_cn");
let i1=document.querySelector(".img1");
let i2=document.querySelector(".img2");
let i3=document.querySelector(".img3");
let i4=document.querySelector(".img4");
let i5=document.querySelector(".img5");
let i6=document.querySelector(".img6");
btnw.addEventListener("click", function(){
i2.style.display="none";
i1.style.display="flex";
i3.style.display="none";
i4.style.display="none";
i5.style.display="none";
i6.style.display="none";
btnd.classList.add("occur");
btnai.classList.add("occur");
btnc.classList.add("occur");
btnw.classList.add("btn_web");
btnos.classList.add("occur");
btncn.classList.add("occur");
})
btnd.addEventListener("click", function(){
i2.style.display="flex";
i1.style.display="none";
i3.style.display="none";
i4.style.display="none";
i5.style.display="none";
i6.style.display="none";
btnw.classList.add("occur");
btnai.classList.add("occur");
btnc.classList.add("occur");
btnd.classList.add("btn_web");
btnos.classList.add("occur");
btncn.classList.add("occur");
})
btnc.addEventListener("click", function(){
i2.style.display="none";
i1.style.display="none";
i3.style.display="flex";
i4.style.display="none";
i5.style.display="none";
i6.style.display="none";
btnc.classList.add("btn_web");
btnw.classList.add("occur");
btnai.classList.add("occur");
btnd.classList.add("occur");
btnos.classList.add("occur");
btncn.classList.add("occur");
})
btnai.addEventListener("click", function(){
i2.style.display="none";
i1.style.display="none";
i3.style.display="none";
i4.style.display="flex";
i5.style.display="none";
i6.style.display="none";
btnw.classList.add("occur");
btnd.classList.add("occur");
btnc.classList.add("occur");
btnai.classList.add("btn_web");
btnos.classList.add("occur");
btncn.classList.add("occur");
})
btnos.addEventListener("click", function(){
i2.style.display="none";
i1.style.display="none";
i3.style.display="none";
i4.style.display="none";
i5.style.display="flex";
i6.style.display="none";
btnw.classList.add("occur");
btnd.classList.add("occur");
btnc.classList.add("occur");
btnai.classList.add("occur");
btnos.classList.add("btn_web");
btncn.classList.add("occur");
})
btncn.addEventListener("click", function(){
i2.style.display="none";
i1.style.display="none";
i3.style.display="none";
i4.style.display="none";
i5.style.display="none";
i6.style.display="flex";
btnw.classList.add("occur");
btnd.classList.add("occur");
btnc.classList.add("occur");
btnai.classList.add("occur");
btnos.classList.add("occur");
btncn.classList.add("btn_web");
})