Jump to content
Search Community

For Each ScrollTrigger Reverse Animation for Other

fonveton test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Hello,

 

I'm looking for help something I couldn't work around. What I'm trying to do is with foreach and scrolltrigger animate each image, but I'm also trying reverse the animation for not current images. What should i do to solve this problem?

 

You can see full demo herehttps://demo.pentayazilim.net/bati-ip/

See the Pen bGaRrGo by manidar (@manidar) on CodePen

Link to comment
Share on other sites

  • Solution

Have you seen .batch() https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.batch()

You can create enter and leave animations. I'd made them with opacity, but now updated them to have your initial animations, but you can animate what ever you want with them.

See the Pen PoEjOpq?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

I've updated your start and end positions, but you can tweak them to your liking 

  • Like 3
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...