Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Call this.$ScrollTrigger.refresh() error when redirect page with Nuxt

Recommended Posts



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

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.

  • Like 1
Link to comment
Share on other sites

I resolved problem scrollHeight when use 

beforeDestroy() {

and add <div> parent 

instead of use this.$ScrollTrigger.refresh() in mounted()


  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.