WeDesignTech Posted May 26, 2023 Share Posted May 26, 2023 Hi all., Great day. When we're using the smooth scroll script the functionality is not working fine as we expected. As per your demo in codepen (https://codepen.io/GreenSock/pen/KKXZOyZ), we tried to include the height with a static value like (height: 9000px;) reference - https://prnt.sc/6K97ufrgm4CE . Shortvideos reference, https://recordit.co/hdjCQztnJM and https://recordit.co/3At0AA5qWD Unfortunately, we can't include the constant value here, the height will differ for each page. So, we tried to get the entire body height from the script. We haven't got any luck on this. Now, we are facing the height calculation methods only. So, anyone please help us to complete this without calculating the height? Thanks in advance See the Pen KKXZOyZ by GreenSock (@GreenSock) on CodePen Link to comment Share on other sites More sharing options...
Rodrigo Posted May 26, 2023 Share Posted May 26, 2023 Hi @WeDesignTech and welcome to the GreenSock forums! Thanks for being a Club GreenSock member and supporting GreenSock! ? Using videos is not the best possible way to give you support. The only thing I was able to spot is the code queue you're setting in wordpress. You have your custom js file first and then all your GSAP files and plugins. Your custom js should have as a dependencie all the GSAP core files and plugins so you have certainty that is being executed after the GSAP core and plugins are loaded. For more information about using GSAP in wordpress check this page: Hopefully this helps. Happy Tweening! 1 Link to comment Share on other sites More sharing options...
Cassie Posted May 26, 2023 Share Posted May 26, 2023 Also a note - Not sure if this is what you're referring to, but in the demo you linked the height is set in the CSS as the contents of the page are absolutely positioned, so there's no native height. This isn't a necessity - Here's a demo without absolutely positioned elements See the Pen rNqbxvR?editors=0100 by GreenSock (@GreenSock) on CodePen 3 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