doughnut-hole
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by doughnut-hole
-
-
ScrollTrigger.create({ trigger: ".trigger-ele", pin: ".pin-ele", start: "top top", end: "bottom bottom" });
I have a simple scroll trigger & pin function like above. Normally, it pins the element as well on scroll-up a page from bottom to top.
So I want to fire pin function only on enter a section, and do not on leave back, just want it to scroll back like a normal, "position: static" element.
How can I achieve this? Does anyone have an idea?
remove pin onLeaveBack
in GSAP
Posted
I just figured it out. just disable or kill it on leave. I'm not sure this is the best way though.