Jump to content
Search Community

scrollTo plugin no longer works? Error -

gsapluvah test
Moderator Tag

Go to solution Solved by gsapluvah,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

https://greensock.com/docs/#/HTML5/GSAP/Plugins/ScrollToPlugin/

I'm using chrome Version 40.0.2214.111 (64-bit)

 

JS files

 

<!--CDN link for the latest TweenMax-->
<!--CDN links for the latest CSSPlugin, and EasePack-->

<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.12.1/easing/EasePack.min.js"></script>:

 

 

When I try even using the sample code,
 

TweenMax.to(window, 2, {scrollTo:{y:400}, ease:Power2.easeOut});

this is the error I get:

 

Uncaught TypeError: Failed to execute 'scrollTo' on 'Window': 2 arguments required, but only 0 present.

What am I doing wrong?


Edit: changed the font size of some of my pasted text
Edit 2: the first edit doesn't work..  ~:/
Edit 3, it doesn't appear to work in Safari (latest) OSX either...  It doesn't scroll at all, and here's the related console message:

 

> Object

 

Link to comment
Share on other sites

  • Solution

The problem was that I did not have the plugin included anywhere in my project.  I thought this used to work with TweenMax, but I guess I was wrong!

 

<!--CDN link for the latest TweenMax-->
			<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.12.1/TweenMax.min.js"></script>
				<!--CDN links for the latest CSSPlugin, and EasePack-->
				<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.12.1/plugins/CSSPlugin.min.js"></script>
				<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.15.1/plugins/ScrollToPlugin.min.js"></script>
				<script src="http://cdnjs.cloudflare.com/ajax/libs/gsap/1.12.1/easing/EasePack.min.js"></script>
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.
×
×
  • Create New...