Jump to content
Search Community

Problem: Skew scrolling + SmoothScrollbar.js

CommonUser test
Moderator Tag

Recommended Posts

Hello again,

 

I've been using GSAP3' ScrollTrigger plugin for a little while now and managed to make the skew on scroll effect work, which I really enjoyed using. Although it does work perfectly with normal scrolling, I can't seem to make it work while using the SmoothScrollbar.js plugin (https://idiotwu.github.io/smooth-scrollbar/).

 

Please note to the Pen provided: when the SmoothScrollbar is removed, the skew on scroll effect works. 

 

I know GSAP and SmoothScrollbar are separate plugins so I'd understand if it just wouldn't work but I hope someone can find a solution.  

 

Sincerely,

 

Julius

See the Pen ZEWwdxN by enneking (@enneking) on CodePen

Link to comment
Share on other sites

Hey @CommonUser

 

That is because you have to define a scroller for each of your ScrollTriggers, when working in a setup as such.

 

I added

 

scroller: "#my-scrollbar",

 

to your ScrollTriggers, and also changed your scrollerProxy to

 

ScrollTrigger.scrollerProxy("#my-scrollbar", { ...

 

and now it works.

 

See the Pen 39472696135060952a1aa0860eecb919 by akapowl (@akapowl) on CodePen

 

 

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