Jump to content


ScrollSmoother: Error `Uncaught TypeError: v.resetTo is not a function` when using data-lag

Go to solution Solved by GreenSock,

Recommended Posts



I am using ScrollSmoother, and the scroll behaviour, speed effect, etc. is all working fine.

The issue arises when I use the lag effect, which results in the following error:

vendors.js?ver=514311651744774:9 Uncaught TypeError: v.resetTo is not a function
    at Object.onUpdate (vendors.js?ver=514311651744774:9:4336)
    at Object.c [as onRefresh] (vendors.js?ver=514311651744774:9:3496)
    at vendors.js?ver=514311651744774:9:2381
    at Array.forEach (<anonymous>)
    at T (vendors.js?ver=514311651744774:9:2169)
    at vendors.js?ver=514311651744774:9:25389
    at Array.map (<anonymous>)
    at Dt (vendors.js?ver=514311651744774:9:25365)
    at Xt (vendors.js?ver=514311651744774:9:26025)


I am registering the plugins, initializing smoother with effects set to true.


/* Register plugins */
gsap.registerPlugin( ScrollTrigger, ScrollSmoother );

/* Smooth scroll */
let smoother = ScrollSmoother.create( {
	wrapper: '[data-scroll-wrapper]',
	content: '[data-scroll-content]',
	effects: true
} );

smoother.effects( '.box', {
	lag: ( i ) => i * 0.5
} );


However, the lag that is applied to the `.box` elements is what causes the error. I have also tried setting it within the DOM, which results in the same:

<div class="box box1" data-lag="1.5"></div>
<div class="box box2" data-lag="1"></div>
<div class="box box3" data-lag="0.5"></div>

Please can anybody advise?


Thank you!

Link to comment
Share on other sites

Hi @coderesolution :)


Welcome to the forum and thanks for being a Club member. We appreciate it.


Could you put that into a minimal demo for us please? We'd be happy to take look and get you pointed in the right direction.


You can also double check that you're using the latest versions of GSAP and the plugins.


Happy tweening and welcome aboard. 



  • Like 1
Link to comment
Share on other sites

  • Solution

Sounds like you are using an old version of the GSAP core. ScrollSmoother requires at least 3.10.0

Link to comment
Share on other sites

Hey @PointC and @GreenSock, updating my version to 3.10.0 solved the issue. Apologies for the oversight, and thank you for the support!

  • 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.