How to Edit GSAP Animations
The Services section uses GSAP and ScrollTrigger to create a layered scroll effect. Each panel stays pinned while its content scrolls, then shrinks and fades as the next panel arrives.
Important: The animation depends on specific class names and attributes. Don’t rename or remove them unless you also update the code.
1. Element Map
Selector
What it does
.layered-panel
Main panel container. Controls pinning, scaling and fading.
[data-pin-body]
Content area that scrolls upward while the heading stays in place.
First child of .layered-panel
Used to measure the panel content height and calculate the scrolling distance.
2. Customizing Key Variables
Locate buildLayeredPanels() in your custom code. Site Settings → Custom Code → Before <body/> tag
// Panel shrink and fade
tl.to(panel, {
scale: 0.7, // Final size. 1 = no shrink, lower = smaller
opacity: 0.5, // Fade level mid-transition. 1 = no fade
duration: vh * 0.9, // Scroll distance for this phase (not seconds)
ease: 'none',
}).to(panel, {
opacity: 0, // Fully fades out at the end
duration: vh * 0.1, // Keep both durations adding up to vh
ease: 'none',
});
// Scroll behavior
scrollTrigger: {
trigger: panel,
start: 'bottom bottom', // Pin begins when panel's bottom hits screen bottom
end: '+=' + (difference + vh),
pin: true, // Turn pinning on or off
pinSpacing: false, // Leave off, spacing is handled by the code
scrub: true, // Ties the animation to scroll position
}3. Removing GSAP Animations
- Delete the two GSAP
<script src>tags and the custom<script>block
Save & republish.
Effect: all elements display in their default static state immediately, with no layout breakage.