Jump to content
Search Community

ScrollTrigger animation problem

Andy777 test
Moderator Tag

Recommended Posts

Hi, 

 

I have a problem on this animation. When a user scroll for the first time the first div scale to 0 and set its height to 0 then it displays none.

That's works well on first div animation but with the second div it don't work as it should do with the first.

What i am doing wrong and how i can solve that issue?

See the Pen qBMPdYx by Andy199807 (@Andy199807) on CodePen

Link to comment
Share on other sites

Hey, so the markers are in the wrong place as you're adjusting the height of the body.

You can call ScrollTrigger.refresh() to get around this - this works but is this really what you're going for? It seems a little odd.

See the Pen gOdGpyN?editors=0010 by GreenSock (@GreenSock) on CodePen

 

You can't scroll back up and the animation happens immediately after the first ends.

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