meTa
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by meTa
-
-
hi,
i'm using the following code to create a fake horizontal scroll
tween = gsap.to(sections, {xPercent: -100 * (sections.length - 1),ease: "none",scrollTrigger: {id: "pagecontent",trigger: ".pagecontent",pin: true,scrub: 1,snap: false,end: () => "+=" + (panelsContainer.offsetWidth - innerWidth)}});on my mobile version (screen < 992px) i dont want to use gsap at all.
i've added a eventlistener for resize and checking if the size is < 992px.
my question now is how do i completely kill / destroy all gsap settings?
i've already tried
tween.kill(true);gsap.killTweensOf('.panel')ScrollTrigger.getById("pagecontent").kill(true);gsap.set(sections, {clearProps: true});this does not work. all transforms and the pin-spacer div element will stay.
is there any method or way to remove gsap on page resize?
thanks
remove gsap on window resize event
in GSAP
Posted
thank you for your fast reply @OSUblake
the tween.scrollTrigger.kill(true) does all what i need. for sure the matchMedia would be a better approach. ill check that later.
thank you!