-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
71 lines (68 loc) · 1.49 KB
/
index.js
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
let tl = gsap.timeline()
tl.from('.navbar .logo img, .list-iteams ', {
y: -100,
opacity: 0,
duration :1,
stagger: 0.7
})
tl.from('.left h1', {
x: -100,
opacity: 0,
duration :0.8,
stagger: 0.7
})
tl.from('.text-btn .first-line h6, .text-btn .second-line h6, .text-btn .third-line h6', {
x: -100,
opacity: 0,
duration :0.8,
stagger: 0.7
})
tl.from('.btn ', {
x: -100,
opacity: 0,
duration :0.8,
stagger: 0.7
})
tl.from('.right ', {
x: 100,
opacity: 0,
duration :0.8,
stagger: 0.7
})
gsap.from(" .dots-div ",{
opacity:0,
duration: 1,
scrollTrigger : {
trigger : ".dots-div ",
scroller : 'body',
// markers: true,
start : 'top 60%',
scrub : 1
}
})
gsap.from(" .all-text h3 ",{
y:100,
opacity:0,
duration: 1,
stagger: 0.3,
scrollTrigger : {
trigger : ".all-text h3 ",
scroller : 'body',
// markers: true,
start : 'top 170%',
scrub : 1
}
})
let nav = document.querySelector('.list-iteams');
let menu = document.getElementById('menu');
let cross = document.getElementById('cross');
menu.addEventListener('click', (()=>{
nav.style.transform = 'translateX(0)';
cross.style.display = 'block';
menu.style.display= 'none';
}))
cross.addEventListener('click', (()=>{
nav.style.transform = 'translateX(100%)';
menu.style.display = 'block';
cross.style.display= 'none';
}))