-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
29 lines (23 loc) · 792 Bytes
/
script.js
File metadata and controls
29 lines (23 loc) · 792 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
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');
menu.classList.toggle('open');
};
window.onscroll = () => {
menu.classList.remove('bx-x');
menu.classList.remove('open');
};
const sc = ScrollReveal ({
distance: '60px',
duration: 2500,
delay: 400,
reset: true
} )
sr .reveal('.home-text',{delay:200, origin:'top'});
sr .reveal('.home-img',{delay:300, origin:'top'});
sr .reveal('.feature, .product, .cta.content, .contact',{delay:200, origin:'top'});