Share Posted February 5, 2015 Hi everybody, I've been successfully using GSAP for a while now and I am absolutely in love with it-as a side note I've developed a front-end UI animation pack for it which I will share with the community soon-but I'm struggling to get scrollToPlugin working. I am using the correct syntax, and I'm currently using requireJS to bring through the scripts as dependencies, with scrollToPlugin being loaded from cdnjs *after* TweenMax. Whatever I do, I keep getting the error: Uncaught TypeError: Failed to execute 'scrollTo' on 'Window': 2 arguments required, but only 1 present. I really have no idea what could be causing it anymore. My scroll syntax is: TweenMax.to(window, 1, {scrollTo : { y: 500, x=0 }, ease: Power1.easeOut }); This is executed when a button is clicked. Wonderful community, please help me! Link to comment Share on other sites More sharing options...
Share Posted February 5, 2015 Hello gdgr, and welcome to the GreenSock Forum Here is a GSAP forum topic on Using TimelineLite and TweenLite with requirejs http://greensock.com/forums/topic/7213-using-timelinelite-and-tweenlite-with-requirejs/#entry26981 http://greensock.com/forums/topic/7213-using-timelinelite-and-tweenlite-with-requirejs/ And here is a working example of the ScrollToPlugin: See the Pen AsLfc by jonathan (@jonathan) on CodePen I hope it helps 2 Link to comment Share on other sites More sharing options...
Share Posted February 28, 2016 why does it not work on mobile devices? Link to comment Share on other sites More sharing options...
Share Posted February 28, 2016 I just tested my above example on mobile Chrome and Safari and I see it working See the Pen AsLfc by jonathan (@jonathan) on CodePen Tested on Droid Turbo (Latest Android) and iPad Air (latest ios) Do you have an example that you made that is not working? .. If so please provide a limited codepen example. https://youtu.be/g13vpXbs34I Thanks, this way we can test your code live on codepen 3 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