-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.js
More file actions
73 lines (62 loc) · 1.39 KB
/
app.js
File metadata and controls
73 lines (62 loc) · 1.39 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
61
62
63
64
65
66
67
68
69
70
71
72
73
const menu = document.querySelector('#mobile-menu');
const menuLinks = document.querySelector('.navbar__menu');
const navLogo = document.querySelector('#navbar__logo');
const body = document.querySelector('body');
const mobileMenu = () => {
menu.classList.toggle('is-active');
menuLinks.classList.toggle('active');
body.classList.toggle('active');
};
menu.addEventListener('click', mobileMenu);
gsap.registerPlugin(ScrollTrigger);
gsap.from('.animate-hero', {
duration: 0.6,
opacity: 0,
y: -150,
stagger: 0.3
});
gsap.from('.animate-services', {
scrollTrigger: '.animate-services',
duration: 0.5,
opacity: 1,
x: -150,
stagger: 0.12
});
gsap.from('.animate-img', {
scrollTrigger: '.animate-services',
duration: 1.2,
opacity: 0,
x: -200,
})
gsap.from('.animate-membership', {
scrollTrigger: '.animate-membership',
duration: 1,
opacity: 0,
y: -150,
stagger: 0.3,
delay: 0.5
});
gsap.from('.animate-card', {
scrollTrigger: '.animate-card',
duration: 1,
opacity: 0,
y: -150,
stagger: 0.1,
delay: 0.2
});
gsap.from('.animate-team', {
scrollTrigger: '.animate-team',
duration: 1,
opacity: 0,
y: -150,
stagger: 0.3,
delay: 0.2
});
gsap.from('.animate-email', {
scrollTrigger: '.animate-email',
duration: 0.8,
opacity: 0,
y: -150,
stagger: 0.25,
delay: 0.4
});