MarcoCuel Posted February 28, 2025 Posted February 28, 2025 Hello everyone, I hope you are all well. I have a problem after trying to use toggleAction, this error appears in the console "Invalid property" "toggleActions" "set to" "play pause resume reset" "Missing plugin? gsap.registerPlugin()" See the Pen yyLgVOq?editors=1011a by MarcoCuel (@MarcoCuel) on CodePen.
Solution Rodrigo Posted February 28, 2025 Solution Posted February 28, 2025 Hi, The toggleActions option should be inside the ScrollTrigger config object, not in a Tween/Timeline's config object: // Wrong gsap.to(target, { x: 200, toggleActions: "play pause resume reset", }); // Right gsap.to(target, { x: 200, scrollTrigger: { toggleActions: "play pause resume reset", }, }); https://gsap.com/docs/v3/Plugins/ScrollTrigger/?page=1#toggleActions Hopefully this clear things up Happy Tweening!
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