Jump to content
Search Community

Arman_

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Arman_

  1. Arman_

    GSAP CAROUSEL

    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 }); https://codepen.io/PointC/pen/mdPOyYZ/a18bfadb3e315a0d18d4e34d264aa25e 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.
×
×
  • Create New...