Jump to content
Search Community

doughnut-hole

Members
  • Posts

    2
  • Joined

  • Last visited

doughnut-hole's Achievements

  1. const elementPin = ScrollTrigger.create({ trigger: triggerEle, start: "top top", end: "bottom bottom", pin: pinEle, onLeave: () => { elementPin.disable(true) }, }) I just figured it out. just disable or kill it on leave. I'm not sure this is the best way though.
  2. 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?
×
×
  • Create New...