-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
60 lines (41 loc) · 1.44 KB
/
Copy pathscript.js
File metadata and controls
60 lines (41 loc) · 1.44 KB
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
var sidemenu=document.getElementById("sidemenu")
function openmenu(){
sidemenu.style.right="0";
}
function closemenu(){
sidemenu.style.right="-100%";
}
var tablinks=document.getElementsByClassName("tab-links")
var tabcontains=document.getElementsByClassName("tab-contains")
function opentab(tabname){
for(tablink of tablinks){
tablink.classList.remove("active");
}
for(tabcontain of tabcontains){
tabcontain.classList.remove("active-tab");
}
event.currentTarget.classList.toggle("active");
document.getElementById(tabname).classList.add("active-tab")
}
var icon = document. getElementById("icon");
icon. onclick = function (){
document.body.classList. toggle ("light-mode");
if (document. body.classList.contains ("light-mode")){
icon. src = "moon.png";
}else{
icon.src = "sun.png";}
}
// function open(skillId) {
// // Get all elements with the class "skill-menulist"
// const skillMenus = document.querySelectorAll('.skill-menulist');
// // Loop through each skill menu and hide its child list if it's not the selected skill
// skillMenus.forEach(skillMenu => {
// const list = skillMenu.querySelector('ul');
// if (skillMenu.id === skillId) {
// list.classList.remove('hide');
// } else {
// list.classList.add('hide');
// }
// });
// }
{/* */}