-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
36 lines (28 loc) · 942 Bytes
/
script.js
File metadata and controls
36 lines (28 loc) · 942 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
30
31
32
33
34
35
// Basic Animations for Header, Navigation & Footer
gsap.from("h2", { duration: 1, opacity: 0, y: -50, ease: "bounce" });
gsap.from("nav", { duration: 1, opacity: 0, y: -50, ease: "power3.out" });
gsap.from("footer", { duration: 1, opacity: 0, y: 50, ease: "power3.out" });
// Register ScrollTrigger Plugin
gsap.registerPlugin(ScrollTrigger);
// Scroll-triggered Animation for Team Section
gsap.to("#team-section", {
duration: 1.5,
opacity: 1,
y: 0,
ease: "power3.out",
scrollTrigger: {
trigger: "#team-section",
start: "top 85%",
}
});
// Mobile Menu Toggle Function
function toggleMenu() {
document.querySelector('.mobile-menu').classList.toggle('hidden');
}
let scrollContent = document.querySelector('.scroll-content');
function pauseScroll() {
scrollContent.style.animationPlayState = 'paused';
}
function resumeScroll() {
scrollContent.style.animationPlayState = 'running';
}