Jump to content
Search Community

scrollTrigger Animation

fpigletov test
Moderator Tag

Recommended Posts

Hi, there
I got one issue with building animation on my website. 

At first (after site loaded) i have an animation tied to scroll, to make it works smoothly i set the end '+=3000'. Everything works fine. But i have problems with next sections. I cant undersatnd how to set 'start" for their "scrollTrigger". Need to calculate 'start' for each section? if 1st section 3000px, so next one should start at 3100px for example and next 3100px + height of previous section etc. Or your have much easier solution? 

Link to comment
Share on other sites

Hello there!

 

Do you have a simple minimal demo? It's hard to see without looking at your setup and what you're trying to achieve. It sounds like maybe you don't realise that the trigger can be any element, it doesn't have to be the body. Each section can 'trigger' itself.
 

scrollTrigger: {
  trigger: ".section",
  start: "top bottom", // when the top of the trigger hits the bottom of the viewport
  end: "bottom top", // when the bottom of the trigger hits the top of the viewport
}


If you're still stuck a demo would be great - we can tweak it and get you on the right track!

 

Hope this helps!

 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...