Jump to content
Search Community

Last element should not fade out when scroll top to bottom or bottom to top

Boski Mehta test
Moderator Tag

Recommended Posts

thanks for the demo.

 

option 1: instead of using a stagger use a loop to create the animations and add them to the timeline. inside your loop run a condition that checks if you're on the last iteration. if yes, don't add that animation to the timeline.

 

option 2: use a function based value for the autoAlpha property in the stagger. with this technique you can run a condition on each target to see if it is the last or not. based on that condition you can return a custom value. here is a demo for option 2

 

See the Pen rNvBQYV by snorkltv (@snorkltv) on CodePen

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