WordPress 5 integration in GSAP Posted November 5, 2019 On 2/25/2019 at 10:48 AM, Jonathan said: <?php // The proper way to enqueue GSAP script // wp_enqueue_script( $handle, $src, $deps, $ver, $in_footer ); function theme_gsap_script() { wp_enqueue_script( 'gsap-js', 'http://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.1/TweenMax.min.js', array(), false, true ); wp_enqueue_script( 'gsap-js-custom', get_stylesheet_directory_uri() . '/js/custom-gsap-scripts.js', array(), false, true ); } add_action( 'wp_enqueue_scripts', 'theme_gsap_script' ); ?> This didn't actually work for me - not sure if anyone else is having the same issue. I tweaked the second row from gsap-js, to gsap-script and it started working straight away! wp_enqueue_script( 'gsap-js', 'http://cdnjs.cloudflare.com/ajax/libs/gsap/2.1.1/TweenMax.min.js', array(), false, true ); wp_enqueue_script( 'gsap-script', get_stylesheet_directory_uri() . '/js/gsap-scripts.js', array(), false, true ); 1
WordPress 5 integration
in GSAP
Posted
This didn't actually work for me - not sure if anyone else is having the same issue.
I tweaked the second row from gsap-js, to gsap-script and it started working straight away!