wpsoul Posted May 17, 2022 Share Posted May 17, 2022 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 More sharing options...
PointC Posted May 18, 2022 Share Posted May 18, 2022 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. 2 Link to comment Share on other sites More sharing options...
wpsoul Posted May 18, 2022 Author Share Posted May 18, 2022 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now