I have this timeline.
const tl = gsap.timeline({
defaults: {
ease: "none"
},
scrollTrigger: {
trigger: "#section-01",
pin: true, // Pin everything till the end then nomraly scroll
scrub: true, // Tie animation to scroll
// markers: true, // Show what ScrollTrigger is doing,,
end: 'bottom 66.66%',
onLeave: (self) => {
self.kill(true);
overlay.classList.add("hide");
window.scrollTo(0, 0);
},
onLeave: () => done.play(), // Play some other timeline
}
});
I want 2 things to happen onleave (self.kill + done.play)
How do I write this in order to get it working?