flowen Posted November 4, 2020 Share Posted November 4, 2020 š Ā See the code here Ā What am I doing wrong here? I basically took the code from the codepen example form the docs Ā the _toArray is a reference to gsap.utils.toArray but not sure how that could help me . Ā Ā also I was wondering about the following: why in the example codepenĀ is thereĀ a variableĀ totalScroll to calculate the scrollHeight?Ā It's only set on 'load' but never set again after. Still even though I resize the screen it works perfectly.. MagicĀ š¤ Ā See the Pen PoZRwPW?editors=0010 by ashthornton (@ashthornton) on CodePen Link to comment Share on other sites More sharing options...
Solution ZachSaucier Posted November 4, 2020 Solution Share Posted November 4, 2020 2 hours ago, flowen said: What am I doing wrong here? You need to load GSAP and register ScrollTrigger in your smoothscroll.js file. Ā 2 hours ago, flowen said: why in the example codepenĀ is thereĀ a variableĀ totalScroll to calculate the scrollHeight?Ā It just the scroll distance for the peaches around so not vital to resize. 4 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