SumitJadhav Posted September 24, 2020 Posted September 24, 2020 I am using <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.12.1/TweenMax.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.19.0/plugins/ScrollToPlugin.min.js"></script> for smooth scrolling which was working fine initially. But when I use <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script> for svg animation it gives me error as "gsap.min.js:10 Uncaught TypeError: Failed to execute 'scrollTo' on 'Element': parameter 1 ('options') is not an object.". Any solution for same?
ZachSaucier Posted September 24, 2020 Posted September 24, 2020 Hey Sumit and welcome to the GreenSock forums. It's not exactly clear what the issue is given you didn't provide a complete demo. My guess is that you're trying to use an old version of the ScrollToPlugin with the new GSAP 3 core. That won't work. If you're going to use the GSAP 3 core then you also need to use the GSAP 3 version of the plugins. Try this: <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/ScrollToPlugin.min.js"></script> If that doesn't fix the issue, please create a complete and minimal demo on CodePen as this thread covers: 1
SumitJadhav Posted September 24, 2020 Author Posted September 24, 2020 13 minutes ago, ZachSaucier said: Hey Sumit and welcome to the GreenSock forums. It's not exactly clear what the issue is given you didn't provide a complete demo. My guess is that you're trying to use an old version of the ScrollToPlugin with the new GSAP 3 core. That won't work. If you're going to use the GSAP 3 core then you also need to use the GSAP 3 version of the plugins. Try this: <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/ScrollToPlugin.min.js"></script> If that doesn't fix the issue, please create a complete and minimal demo on CodePen as this thread covers: Hi ZachSaucier, thank you so much for quick response. It works now by updating version. Thanks a Ton... !!!!
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