aerra Posted July 13, 2022 Share Posted July 13, 2022 Hi, I came across this official codepen made by GreenSock, but after scrolling and then resizing the browser it seems to break - does anyone know if there is a solution for this? See the Pen gOgWELo?editors=0010 by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted July 13, 2022 Share Posted July 13, 2022 The BEST way would be to just use ScrollSmoother which is the next evolution of that helper function - it has way more features and is more bulletproof. https://greensock.com/scrollsmoother However, I just updated that demo to solve the issue you described (just had to change .kill() to .pause() in one spot). 1 Link to comment Share on other sites More sharing options...
aerra Posted August 23, 2022 Author Share Posted August 23, 2022 @GreenSock, Thank you for your last comment. I was wondering if there is any way to make the scrolling still work when navigating through the tab key. Here's an example: See the Pen rNdRXNP?editors=1100 by aerra (@aerra) on CodePen As of now, if you press the tab key three times (to get to box C), you'll see that the scrollbar doesn't update and there is no smooth scrolling. 1 Link to comment Share on other sites More sharing options...
Cassie Posted August 23, 2022 Share Posted August 23, 2022 On 7/13/2022 at 10:02 PM, GreenSock said: The BEST way would be to just use ScrollSmoother which is the next evolution of that helper function - it has way more features and is more bulletproof. https://greensock.com/scrollsmoother ^ yep - this is how! Link to comment Share on other sites More sharing options...
aerra Posted August 23, 2022 Author Share Posted August 23, 2022 18 minutes ago, Cassie said: ^ yep - this is how! Thank you, I understand that is an option, but it is not available for me. My question still stands. Link to comment Share on other sites More sharing options...
Cassie Posted August 23, 2022 Share Posted August 23, 2022 Our advice would be to use ScrollSmoother, that already has support for tabbing. We don't have any plans to extend this helper function any further. Good luck with your project! 1 Link to comment Share on other sites More sharing options...
Diego S.A. Posted October 3, 2023 Share Posted October 3, 2023 Hello! Is there a way to make anchor links work while using the smoothScroll() for ScrollTrigger code example in @aerra reply? Thanks! Link to comment Share on other sites More sharing options...
GreenSock Posted October 3, 2023 Share Posted October 3, 2023 54 minutes ago, Diego S.A. said: Hello! Is there a way to make anchor links work while using the smoothScroll() for ScrollTrigger code example in @aerra reply? We don't support that old helper function anymore, since ScrollSmoother has been introduced and is far more robust. You could try the helper function for links here, but if you still need help please make sure you provide a minimal demo that clearly illustrates the issue. And again, please keep in mind that we don't support that very old smoothScroll() helper function anymore. The deficiencies were what drove us to create ScrollSmoother in the first place. Happy tweening! 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