Jump to content
Search Community

ScrollTrigger is not working in the second element

Али К
Moderator Tag

Go to solution Solved by OSUblake,

Recommended Posts

Posted

Hello There,
I got a problem with my animation when I use the scrollTrigger for the second element.
Also , I can't see the markers!
any explanation ?
Thanks

See the Pen gOopGeJ?editors=1010 by itsalimanuel (@itsalimanuel) on CodePen.

Posted

Hi Ali,

 

Did you change something in your pen because everything looks fine to me, including the markers?

 

image.png

 

  • Solution
Posted

I noticed several issues, like you had auto misspelled for the body height, and there is no moredeepTrigger element. Perhaps you are looking for something like this? I just add a refresh call right after the page becomes scrollable.

 

See the Pen zYpGaQR by GreenSock (@GreenSock) on CodePen.

 

  • Thanks 1
Posted

Exactly , so the point it was to add this line ?

.add(() => ScrollTrigger.refresh())

Many thanks @OSUblake

  • Like 1

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