Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Doxx

Scrolltrigger is not working in my codepen.

Go to solution Solved by OSUblake,

Recommended Posts

Hey,

I'm currently stuck at triggering some text animations on scroll using the ScrollTrigger plugin. Probably because of some silly mistake from my part. What I'm noticing is that the animation triggers immediately upon refresh. However, I'm not entirely sure why. The markers, start and end are not working as well.

I've attached the Codepen URL in case someone would like to investigate further.

Thanks in advance.

See the Pen rNzVYbq by Ahmad_Mansour (@Ahmad_Mansour) on CodePen

Link to comment
Share on other sites

  • Solution

Hi Doxx,

 

Your ScrollTrigger should be part of the timeline. Other stuff I noticed is that it's best to use numbers for numbers, not strings. For percentage transforms, you can use xPercent/yPercent instead. 

 

And cubic-bezier isn't a gsap ease. You can use use CustomEase for that. 

CustomEase.create("custom", "0.165, 0.84, 0.44, 1")

 

This should help you get started.

 

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

 

  • Like 2
Link to comment
Share on other sites

Thank you very much for your swift response, Blake!

The pen you integrated was more than sufficient to solve my problem & write proper GSAP.

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