Hello lads,
first of all I apologize for my little knowledge of php.
I added gspa to a project that I am carrying out, through the function.php of Hello Elementor child theme adding this simple code:
function wpb_adding_scripts(){
wp_register_script( 'gsap', 'https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.1/gsap.min.js', array(), '1.0', true );
wp_register_script( 'gsap-settings', get_stylesheet_directory_uri() .'/gsap.js', array('gsap'), '1.0', true );
wp_enqueue_script('gsap'); // This is probably not needed since below we are enqueueing the gsap-settings file with has a dependency on the gsap script, so it should enqueue both
wp_enqueue_script('gsap-settings');
}
add_action( 'wp_enqueue_scripts', 'wpb_adding_scripts' );
and it works.
But the problem is that I can't add Scroll Trigger, and therefore all the functionality of this extra plugin via cdn in this function.
Can anyone help me?
Thanks, Davide