Hi @Rodrigo
Thanks for your support.
I'm using ScrollTrigger. It seems Tween height to 0 is smoother than scaleY to 0 when scroll up back on trackpad.
Here is the project I'm working on project
and here is the script.
Kindly advise what I did wrong.
$("#wrapper-team").each(function (index) {
let triggerElement = $(this);
//let targetElement = $(".reveal-col");
let tl = gsap.timeline({
scrollTrigger: {
trigger: triggerElement,
start: "top +100px",
end: "bottom +100px",
scrub: 0.01,
pin: true
}
});
tl.to("#ani-col4", { scaleY: 0, duration: 5, stagger: 0.2, ease: "none", transformOrigin:"bottom" });
tl.to("#ani-col3", { height: 0, duration: 4, stagger: 0.3, ease: "none", transformOrigin:"top" },'<+=0.2');
tl.to("#ani-col1", { height: 0, duration: 6, stagger: 0.1, ease: "none", transformOrigin:"top" },'<+=0.1');
tl.to("#ani-col6", { height: 0, duration: 6, stagger: 0.6, ease: "none", transformOrigin:"top" },'<+=0.3');
tl.to("#ani-col2", { scaleY: 0, duration: 6, stagger: 0.2, ease: "none", transformOrigin:"bottom" },'<+=0.2');
tl.to("#ani-col5", { scaleY: 0, duration: 4, stagger: 0.2, ease: "none", transformOrigin:"bottom" },'<+=0.2');
});