Share Posted April 29, 2022 I have a a "click" event listener that expands some read more text. I have called ScrollTrigger.refresh(true) in that callback which is kind of working. I have a transition being applied to the height of the element of 500ms, so the refresh is slightly out when recalculating the trigger position. I read that if trueis set, it will wait for at least one requestAnimationFrame tick, and up to roughly 200ms before initiating the refresh. If I set the duration to 200ms of my transition then refresh sets the position perfectly. Is there anyway to increase/manually update the duration that ScrollTrigger.refresh(true) takes in order to allow for the transition to take place and then have the trigger position reset? Thanks Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now