Hi,
I'm new on GSAP and I have been reading about integrating it on Wordpress. I already integrated other libraries in the past like waypoints.js
I've followed the rules of the existing topics about it, but I still get an error:
Uncaught ReferenceError: gsap is not defined
at custom-gsap-scripts.js?ver=5.5.1:11
on this example from Codepen:
const anim = gsap.to(".box", {
rotation: 27,
x: 100,
duration: 1,
ease: "power3",
repeat: -1,
repeatDelay: 1
});
These are the steps I followed:
1. Enqueue via CDN in functions.php in the child theme (using get_stylesheet_directory_uri())
2. Create the directory in the child theme with the file custom-gsap-scripts.js
3. I added my custom GSAP code waiting the DOM is ready.
Did I missed something? Could anyone help me?
Thanks very much in advance.
Greetings.