Jump to content
Search Community

Issue with GSAP/ScrollTrigger & Locomotive Scroll

neontrenton test
Moderator Tag

Recommended Posts

Hello.

 

I'm having trouble getting any GSAP animations to properly show when using Locomotive Scroll.

 

It works properly in Codepen, but in my dev environment, the splittext animations do not fire unless the screen is resized.

 

Any ideas what I'm doing wrong here? I can't seem to replicate in Codepen so I'm not sure how to troubleshoot. 

 

Thanks for any help you can send my way!

See the Pen VwrNzmY by neontrenton (@neontrenton) on CodePen

Link to comment
Share on other sites

Welcome to the forums @neontrenton

 

One thing with use a third party scroller is that you need to set the scroller...

 

 

And there is a known regression with from animations, so try adding lazy: false to your animations.

 

 

Another thing, it's best use numbers instead of strings for number values, and there is no need to use css object wrapper.

 

const anim = gsap.fromTo(box, {opacity: 0, y: 20 }, {opacity: 1, y: 0 });

 

 

 

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