pcreative Posted January 18, 2022 Share Posted January 18, 2022 First of all, Congrats for this amazing library GreenShock. I've been reading on the forum first, trying to solve my problem but I couldn't solve it yet. My problem is: .pin-spacer remains on nuxt link to another page and I get a padding on the bottom. If y kill() my scrollTrigger in the beforeDestroy() hook, my nuxt page appears white, it seems to delete all what .pin-spacer had inside. I made a codesandbox for you to see: https://codesandbox.io/s/gsap-pages-problem-pghld?file=/pages/index.vue Edit: I tried both nuxt-gsap-module and manually import gsap and scrollTrigger with transpile option. Link to comment Share on other sites More sharing options...
Solution OSUblake Posted January 19, 2022 Solution Share Posted January 19, 2022 Welcome to the forums @pcreative You shouldn't pin the root element in a component/page as GSAP has to mess with DOM structure outside of it, so just add another div to wrap it. https://codesandbox.io/s/gsap-pages-problem-forked-rkyg4?file=/pages/index.vue 1 Link to comment Share on other sites More sharing options...
pcreative Posted January 19, 2022 Author Share Posted January 19, 2022 Thank you very much @OSUblake. You made my day. Everything work now.😊 1 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