Skip to content
document.addEventListener("DOMContentLoaded", function() {
gsap.registerPlugin(ScrollTrigger);
// Fade in & Move Up Effect (Text)
gsap.from("#scroll-text", {
opacity: 0,
y: 50,
duration: 1.5,
scrollTrigger: {
trigger: "#scroll-text",
start: "top 80%",
end: "top 50%",
scrub: false,
toggleActions: "play none none none"
}
});
// Fade in & Zoom Effect (Image)
gsap.from("#scroll-image", {
opacity: 0,
scale: 0.8,
duration: 1.5,
scrollTrigger: {
trigger: "#scroll-image",
start: "top 90%",
end: "top 60%",
scrub: false,
toggleActions: "play none none none"
}
});
});