Kency Posted May 22, 2022 Share Posted May 22, 2022 Hello! First of all, thank you so much with GSAP ! I use nuxt-gsap-module when I redirect between 2 page by nuxt-link, seem scroll height not refresh, it use scroll height of page previous. I use this.$ScrollTrigger.refresh() but it error. I use CodePen Home ScrollTrigger - Horizontal Scroll Thank all See the Pen GRZORvX by olig (@olig) on CodePen Link to comment Share on other sites More sharing options...
Cassie Posted May 22, 2022 Share Posted May 22, 2022 Hey there! Nuxt gsap module isn't actually ours. It's a third party solution. 'Cannot read properties of Null' sounds like you're trying to target something that doesn't exist. Hard to advise beyond this I'm afraid. 1 Link to comment Share on other sites More sharing options...
Kency Posted May 22, 2022 Author Share Posted May 22, 2022 I resolved problem scrollHeight when use beforeDestroy() { this.tl.scrollTrigger.kill(); }, and add <div> parent instead of use this.$ScrollTrigger.refresh() in mounted() Thanks 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