Jump to content
Search Community

Davide Lakka

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Davide Lakka's Achievements

  1. Thank you very much for the timely reply. The code works perfectly! I wrote more threds thinking I have more chance that someone will answer me, I did not think the forum was so efficient! Next time I will be more careful and not adopt the same practice. Thank you, Davide
  2. Hi mvaneijgen, thank you for your answer, I am not familiar with php, I tried to load and also queue ScrollTrigger in the same destination, but surely I am wrong something in writing the function. Could you help me? Thanks again, David
  3. 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
  4. 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
×
×
  • Create New...