Jump to content
Search Community

Animation start before of scrolling

Umberto test
Moderator Tag

Recommended Posts

Oops, I'm really stupid ..... Now everything works, but using LocomotiveScroll, there are these CSS classes

 

html.has-scroll-smooth { overflow: hidden; } 

html.has-scroll-dragging { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; } 

.has-scroll-smooth body { overflow: hidden; } 

 

that do not start the animation. Do I need to add some strings? 

 

Thanks

Link to comment
Share on other sites

 

The reason this combination is not working in your example, is because locomotive-scroll uses a whole different approach to moving the content/window up and down, than the native scroll-behaviour of browsers, thus, ScrollTrigger does not get any helpful information on what to do when, when using a smooth-scrolling library like locomotive-scroll.

 

Since v3.4.0 for these cases there is the very helpful scrollerProxy() though, that helps solving that issue for you.

https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.scrollerProxy

 

 

 

That page linked to above has an example on how to hook up locomotive-scroll and ScrollTrigger:

 

See the Pen 1dc38ca14811bc76e25c4b8c686b653d 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...