Jloafs Posted March 21, 2023 Share Posted March 21, 2023 I'm trying to use scrollsmoother on a page with an accordion that changes the height of the page. This seems to clash with either the wrapper or content div used for the scrollsmoothing - as you can see with the pinned footer after opening and closing the accordions. Is there a way to fix this? Many thanks in advance for any help. See the Pen eYLPYwb?editors=0100 by jloafs-DM (@jloafs-DM) on CodePen Link to comment Share on other sites More sharing options...
Jloafs Posted March 21, 2023 Author Share Posted March 21, 2023 Actually it's hard to replicate in codepen - but on my website, the footer gets pushed when the accordion is expanded. After expanding the accordion, scrolling down to view the footer doesn't seem possible. But on codepen it works. Link to comment Share on other sites More sharing options...
Solution Cassie Posted March 21, 2023 Solution Share Posted March 21, 2023 Heya, thanks for being part of Club GreenSock 💚 You can call ScrollTrigger.refresh() to ask ScrollTrigger to recalculate positions after the layout shifts. Give this a go! Hope it helps See the Pen eYLPvew?editors=0011 by GreenSock (@GreenSock) on CodePen 3 Link to comment Share on other sites More sharing options...
Cassie Posted March 21, 2023 Share Posted March 21, 2023 If that doesn't work - check your version, the codepen is using 3.11.5 ✨ 1 Link to comment Share on other sites More sharing options...
Jloafs Posted March 21, 2023 Author Share Posted March 21, 2023 That's awesome Cassie - thanks heaps. 1 Link to comment Share on other sites More sharing options...
Cassie Posted March 21, 2023 Share Posted March 21, 2023 My pleasure ☺️ 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