• etech0

    (@etech0)


    I have a piece of PHP code that’s supposed to load 3 jquery files. For some reason, I can only see 2 of them in the source. I can’t figure out why – can anyone help me please? The one that doesn’t load is called customjqueryfunctions.js.

    Website: https://www.goinspire.com

    My code:

    add_action( 'wp_enqueue_scripts', 'add_my_jquery', 1 );
    
    function add_my_jquery(){
     //Custom function to load a jquery script called smoothscroll.js that puts a smoothscroll on our site
    
    wp_enqueue_script( 'smoothup', get_template_directory_uri() . '/js/smoothscroll.js', array( 'jquery' ), '',  true );
    
    //end
    
    /*This part is to move the Subscribe button above the Submit button */
    wp_enqueue_script( 'submitbutton', get_template_directory_uri() . '/js/submitbutton.js', array( 'jquery' ), '',  true );
    
    //include jqueryfunctions.js, for some functions (including hotel landing page filters)
    wp_enqueue_script('customjqueryfunctions', get_template_directory_uri() . '/js/customjqueryfunctions.js', array( ), '', true);
    }

    Can anyone help? Thanks!

  • The topic ‘1 of my 3 jquery files is not loading’ is closed to new replies.