Jump to content
Search Community

Arman_

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Arman_

  1. On 8/20/2020 at 10:03 PM, PointC said:

     

    Hi, @PointC I am building one carousel with a different animation, I am trying to understand your codepen, can I get a little explanation on what exactly these lines are doing and how it is looping the slides.

    gsap.set(targets, { xPercent: -100 });
    gsap.set(targets[0], { xPercent: 0 });

    See the Pen a18bfadb3e315a0d18d4e34d264aa25e by PointC (@PointC) on CodePen

    Thanks!

  2. Hello, in my case the problem was when I load my react website, the initial current component which refreshes it is fine and the scroll position is also good but after we navigate to other components their I have images which load after I navigate to that component because of which scroll trigger position fails to load the right position as it doesn't refresh after the image loads.

    So, what I did is in react, there is an attribute called onLoad which gets triggered after the image loads.

    Hence, onLoad={()=>ScrollTrigger.refresh()} solved my problem.

    • Thanks 1
×
×
  • Create New...