-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
28 lines (21 loc) · 700 Bytes
/
Copy pathscript.js
File metadata and controls
28 lines (21 loc) · 700 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
const header = document.querySelector("header");
window.addEventListener("scroll", function() {
header.classList.toggle("sticky", window.scrollY > 0);
});
let menu = document.querySelector('#menu-icon');
let navbar = document.querySelector('.navbar');
menu.onclick = () => {
menu.classList.toggle('bx-x');
navbar.classList.toggle('active');
};
window.onscroll = () => {
menu.classList.remove('bx-x');
navbar.classList.remove('active');
};
const sr = ScrollReveal({
distance: '25px',
duration: 250,
reset: true
});
sr.reveal('.home-text', { delay: 190, origin: 'bottom' });
sr.reveal('.about, .services, .portfolio, .contact', { delay: 200, origin: 'bottom' });