Jump to content
Search Community

meTa

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by meTa

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

×
×
  • Create New...