Jump to content
Search Community

Need help, containerAnimation not working on my timeline

Ian123 test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Hi -

Im trying to create a horizontal scroll website with uneven container sections, each seaction has different animations however when Im trying it in my code pen containerAnimation is not working when I assign it the scroll tween. The markers are still vertical.

Here's a code pen link.

See the Pen abryoWO by ian-marquez (@ian-marquez) on CodePen

Link to comment
Share on other sites

  • Solution

Hi @Ian123 welcome to the forum!

 

The frist step in debugging anything should be updating to the latest version, you were loading version 3.6.1 and we are currently at versions 3.12.5! A lot has changed in the mean time. 

 

When you want thing to work horizontally, you'll have to set horizontal: true on your ScrollTrigger, check the docs for all the ScrollTrigger properties https://gsap.com/docs/v3/Plugins/ScrollTrigger/?page=1

 

You don't have enough space for the animation to finish, so I've moved the element over and changed the ScrollTrigger end trigger. Hope it helps and happy tweening! 

 

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

Link to comment
Share on other sites

I see, thanks for the help! didnt notice the version as I forked of another guy's pen.

So the only thing wrong was horizontal scroll. Shouldn't have trusted an old video from 2021, was saying it was no longer needed lol should have trusted my gut.
again thanks for the help! 

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