• After I have updated the Hello Elementor theme the jQuery $(‘#element’).onClick doesn’t work anymore on mobile devices. I had to downgrade to version 2.9.0

Viewing 1 replies (of 1 total)
  • Hello Theme?doesn’t load jQuery because the theme doesn’t use jQuery anymore.

    If you use custom jQuery code on your website, you need to set jQuery as a dependency for this code.

    Use the following code to load jQuery in your projects:

    function custom_theme_scripts() {
      wp_enqueue_script( 'my-script', get_template_directory_uri() . '/js/my-script.js', [ 'jquery' ], '1.0.0', true );
    }
    add_action( 'wp_enqueue_scripts', 'custom_theme_scripts' );
Viewing 1 replies (of 1 total)
  • The topic ‘Hello Elementor update to version 3.0.0 jQuery onClick doesn’t work anymore’ is closed to new replies.