Jump to content
GreenSock

Ali Manuel

ScrollTrigger is not working in the second element

Moderator Tag
Go to solution Solved by OSUblake,

Recommended Posts

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

Link to comment
Share on other sites

Hi Ali,

 

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

 

image.png

 

Link to comment
Share on other sites

  • Solution

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
Link to comment
Share on other sites

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

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

Many thanks @OSUblake

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