Jump to content
Search Community

ScrollTrigger + TextPlugin

ngrmm test
Moderator Tag

Go to solution Solved by ngrmm,

Recommended Posts

Hi,

 

Using restart in the onEnterBack action seems to work as you expect:

sections.forEach((section) => {
  console.log(section.dataset.pname)
  gsap.to("header span", {
    scrollTrigger: {
      trigger: section,
      start: 'top center',
      end: 'bottom center',
      markers: true,
      // Restart on Enter Back
      toggleActions: "restart none restart none",
    },
    text: section.dataset.pname,
    ease: "none",
  });
});

If you are looking for more fine grained control, the using the callbacks, as you already found out, is the way to go.

 

Let us know if you have more questions.

 

Happy Tweening!

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...