Hi,
I couldn't find if there is something in the docs for this, but I have an element that has a basic transform parallax on it. That same element has a basic toggle class on it when it hits the top of the viewport, however, the makers on the this latter animation are wrong as it takes it from before the parallax.
I guess I need to offset it with the transform? But is this performant as the trigger point is constantly changing?
The two animations.
gsap.to(".js-pick-me-up", {
ease: 'none',
scrollTrigger: {
trigger: ".block-intro",
scrub: true,
start: "top top",
end: window.innerHeight,
},
y: window.innerHeight / 2
});
and
ScrollTrigger.create({
trigger: ".js-pick-me-up",
end: "bottom bottom",
start: "top top",
toggleClass: 'is-fixed'
});
Thanks