forked from espoir-ecs/espoir-ecs.github.io
-
Notifications
You must be signed in to change notification settings - Fork 2
/
jade.js
25 lines (24 loc) · 1 KB
/
jade.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
window.onscroll = function(){
openList();
}
function openList(x){
var cL = document.getElementsByClassName("content_list");
var i;
for(i = 0; i < cL.length; i++){
var OcL = cL[i];
if(cL[i] != document.getElementById("thisList_" + x)){
OcL.classList.remove("show_list");
}
}
document.getElementById("thisList_" + x).classList.toggle("show_list");
}
function openSearch(){
document.getElementById("thisSearch").classList.toggle("show_search");
document.getElementById("btnSearch").getElementsByTagName("i")[0].classList.toggle("hidden");
document.getElementById("btnSearch").getElementsByTagName("i")[1].classList.toggle("visible");
}
function openMenu(){
document.getElementById("thisMenu").classList.toggle("show_menu");
document.getElementById("btnMenu").getElementsByTagName("i")[0].classList.toggle("hidden");
document.getElementById("btnMenu").getElementsByTagName("i")[1].classList.toggle("visible");
}