Krischomat Posted June 20, 2022 Share Posted June 20, 2022 Hey! I am just getting into gsap and trying to implement it in a Vue3 Project. But atm the scrollTrigger does not work for me. I am doing this onMounted(() => { gsap.to(".events", { scrollTrigger: ".events", x: 100, duration: 3 }); }); and the scrollTrigger does not do anything. So the animation starts when the page is loaded no matter if the element is in the viewport or not. Any Ideas? Link to comment Share on other sites More sharing options...
Krischomat Posted June 20, 2022 Author Share Posted June 20, 2022 Ahh got it... import ScrollTrigger from "gsap/ScrollTrigger"; gsap.registerPlugin(ScrollTrigger); 2 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