Arunkrs Posted July 12, 2022 Share Posted July 12, 2022 Hello GSAP Heroes, I'm facing an issues with scrolling. I've a navbar with multiple links. Index page is scrolling fine without issues, but when I clicked on navbar item it redirects to the page but that page doesn't scroll until I refresh it. I don't know what to do. I've used gsap, locomotive scroll and barba js. See the Pen QWmKjJJ by arunkrs (@arunkrs) on CodePen Link to comment Share on other sites More sharing options...
akapowl Posted July 12, 2022 Share Posted July 12, 2022 Hello @Arunkrs If you are using locomotive-scroll for smooth-scrolling and barba.js for page-transitions, and your problem is that your website doesn't scroll anymore after a page-pransition, this really does not sound like a GSAP issue at all but more like logic-issues with regard to locomotive-scroll and barba.js. We love helping with GSAP-related questions, but unfortunately we just don't have the resources to provide free general consulting or logic troubleshooting - especially with regard to different 3rd party libraries. Of course anyone else is welcome to post an answer if they'd like - we just want to manage expectations. You will probably have to make sure to either properly update your locomotive-scroll instance after the transition or to destroy the instance on the old page on leave and create a fresh instance on enter of the new page - there are different approaches to that, depending on how exactly you have things set up. But again; I really don't think that is in any way related to GSAP. There is a section in the barba docs for how to handle 3rd party scripts - it even has a part dedicated to locomotive-scroll suggesting how to handle things with smooth-scrolling libraries as such - I would suggest starting there. Happy tweening! https://barba.js.org/docs/advanced/third-party/ 3 Link to comment Share on other sites More sharing options...
Arunkrs Posted July 14, 2022 Author Share Posted July 14, 2022 Thank You @akapowl Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now