Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
wpsoul

Does killTweensOf kill also attached ScrollTrigger

Recommended Posts

I want to remove all gsap.to, gsap.from and attached Scrolltriggers. Is killTweensOf enough to remove all of them?

Link to comment
Share on other sites

I'm pretty sure killTweensOf will indeed kill the associated ScrollTrigger. Though, any ScrollTriggers associated with timelines will remain. It's easy enough to kill all the ScrollTriggers if needed.

 

  ScrollTrigger.getAll().forEach((t) => {
    t.kill();
  });

Happy tweening.

:)

 

  • Like 2
Link to comment
Share on other sites

9 hours ago, PointC said:

 

  ScrollTrigger.getAll().forEach((t) => {
    t.kill();
  });

Happy tweening.

:)

 

 

Yes, this is what I used before. Problem with this function is that it kills all ST on page and I need to kill only ST of specific containers. Advantage of killTweensOf is that it has option to specify container, this is why I asked if it's killing also ST.

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.
×