Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Can't figure out why a jquery file is not loading!

Discussion in 'Troubleshooting & How-To's' started by etech0, Feb 26, 2014.

  1. etech0

    New Member

    Feb 26, 2014
    Likes Received:
    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: Israel Tours and Vacation Packages - 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 );
    /*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!

Share This Page

Monarch Social Sharing Plugin