-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
68 lines (64 loc) · 1.25 KB
/
script.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
const navId = document.getElementById("nav_menu"),
ToggleBtnId = document.getElementById("toggle_btn"),
CloseBtnId = document.getElementById("close_btn");
// ==== SHOW MENU ==== //
ToggleBtnId.addEventListener("click", () => {
navId.classList.add("show");
});
// ==== HIDE MENU ==== //
CloseBtnId.addEventListener("click", () => {
navId.classList.remove("show");
});
// ==== Animate on Scroll Initialize ==== //
AOS.init();
// ==== GSAP Animations ==== //
// ==== LOGO ==== //
gsap.from(".logo", {
opacity: 0,
y: -10,
delay: 1,
duration: 0.5,
});
// ==== NAV-MENU ==== //
gsap.from(".nav_menu_list .nav_menu_item", {
opacity: 0,
y: -10,
delay: 1.4,
duration: 0.5,
stagger: 0.3,
});
// ==== TOGGLE BTN ==== //
gsap.from(".toggle_btn", {
opacity: 0,
y: -10,
delay: 1.4,
duration: 0.5,
});
// ==== MAIN HEADING ==== //
gsap.from(".main-heading", {
opacity: 0,
y: 20,
delay: 2.4,
duration: 1,
});
// ==== INFO TEXT ==== //
gsap.from(".info-text", {
opacity: 0,
y: 20,
delay: 2.8,
duration: 1,
});
// ==== CTA BUTTONS ==== //
gsap.from(".btn_wrapper", {
opacity: 0,
y: 20,
delay: 2.8,
duration: 1,
});
// ==== TEAM IMAGE ==== //
gsap.from(".team_img_wrapper img", {
opacity: 0,
y: 20,
delay: 3,
duration: 1,
});