(messing around, still not getting the syntax I don't think)...
https://codepen.io/stevescott/pen/zYWZemZ
It's like a tailwind 2 col grid of images (not on the codepen...), on scroll like as they become visible on the page, I'd like to start animating the opacity in. But with this sample it's more like, when the div scrolls into view, maybe 200px from the bottom it THEN starts the opacity animation. I assume it's with my "top center" but I'm not sure what the docs are referring to as "the scroller" I assumed the page...
let destination = document.querySelectorAll('.destination');
destination.forEach(group => {
gsap.to(group, {
opacity: 1,
ease: "power3.out",
duration: 1,
scrollTrigger: {
trigger: group,
start: "top center",
toggleActions: "play none none none"
}
})
});
One thing I'm trying to avoid is having partial opacity items just chilling in the viewport waiting to move up to animate. Kinda just want it to be when the item is popping in from the bottom on scroll, just go ahead and start that animation.
Does that make sense?