-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
31 lines (25 loc) · 686 Bytes
/
Copy pathscript.js
File metadata and controls
31 lines (25 loc) · 686 Bytes
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
AOS.init();
let div = document.querySelector(".hideshow")
function hideShow(){
div.classList.toggle('hide');
}
let div1 = document.querySelector(".hideshow1");
function hideShow1(){
div1.classList.toggle('hide1');
}
let div2 = document.querySelector(".hideshow2");
function hideShow2(){
div2.classList.toggle('hide2');
}
let div3 = document.querySelector(".hideshow3");
function hideShow3(){
div3.classList.toggle('hide3');
}
const activePage = window.location.pathname;
console.log(activePage);
const navLinks = document.querySelectorAll("nav a").
forEach(link => {
if(link.href.includes(`${activePage}`)){
link.classList.add('active');
}
});