Jump to content
GreenSock

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

Horizontal scroll

Recommended Posts

Hello,

 

On my website, I have horizontal scroll that work alone as you can see above.

 

I would like to use BarbaJS to add transition but it breaks the page as you can see here (the horizontal scroll doesn't work and the menu on right disappear). I don't find any solution to use those effects together. May you help me please ?

 

See the Pen wvqZrPv by GNSNTG (@GNSNTG) on CodePen

See the Pen VwzNMqg by GNSNTG (@GNSNTG) on CodePen

Link to comment
Share on other sites

Hi @GNSNTG. Welcome to the forums. 

 

It looks like you're using 2 other 3rd party libraries (LocomotiveScroll and Barba.js) - those aren't GreenSock products so we can't really support them here but if you're dynamically loading content into the same page (so it's not actually refreshing the page and going to a new URL that runs the code from the start), make sure you .kill() all your old ScrollTriggers/animations first and then create the new ones and call ScrollTrigger.refresh() to force it to re-calculate all the start/end trigger positions once things are fully loaded and rendered to the screen. If you want to kill ALL of the ScrollTriggers, you can do that like

ScrollTrigger.getAll().forEach(t => t.kill());

If you still need help, please provide a minimal demo, hopefully with no 3rd party libraries. But if you do use 3rd party libraries, don't include your whole project - just isolate the issue in the most minimal way possible (a few <div> elements, for example). 

 

Happy tweening/scrolling!

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