Jump to content
Search Community

ScrollTrigger playing a timeline on two elements in a forEach at the same time

madebysix test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hi there, can anybody help? 

Hopefully it's something obvious i've missed, but if you look at the codepen, i'm trying to play/flick through the images on scroll. But play both image set's (inside the parenthesis) at the same time.

You'll see it plays the left side, then the right side afterwards.

Thanks

See the Pen XWzWqzw?editors=1010 by jasonbooth (@jasonbooth) on CodePen

Link to comment
Share on other sites

  • Solution

Heya @madebysix!

Thanks for being part of club GreenSock, we appreciate the support. ☺️

So, you're looping through and adding images one by one to one timeline - each image by default will play sequenced after the previous one.

If you want both to play at the same time you'll either need to use the position parameter to position images in the correct spot on the timeline, or you could use two timelines.

See the Pen gOXbJYR by GreenSock (@GreenSock) on CodePen

 

 

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