Jump to content
Search Community

iamStudent

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by iamStudent

  1. On 1/7/2024 at 8:02 PM, Cassie said:

    Hi! It's important to create your ScrollTriggers in the order they appear on the page, you can't do that in this example because you're looping around for the colours.

    You can use .sort to reshuffle and organise your scrolltriggers if you can't define then in the right order.

     

    https://gsap.com/docs/v3/Plugins/ScrollTrigger/static.sort()/

     

    You don't need to pin the content, so you don't need pinContainer - you can just pin the horizontally scrolling section.

    If you do this you'll also need to change the end trigger based on whether the section is pinned or not.

    let isPinned = elements.classList.contains("pin");
    
    ScrollTrigger.create({
      trigger: elements,
      start: "top center",
      end: () => isPinned ? `+=${scrollList.clientWidth - introWrapper.clientWidth}` : "bottom 60%",
      ...
    })


     

     

     

    I hope this helps!

    @Cassie, I am too facing the same issue, in this solution, the issue is still exists, in section 4 fadeup animation still not working. help me

×
×
  • Create New...