• Resolved codejp3

    (@codejp3)


    FYI, getting this error in my dev-tools console:
    “Uncaught ReferenceError: jQuery is not defined”

    I’ve only seen it for bsp_quote.js, but I would assume it’s happening for every js file that does not list ‘jquery’ as a dependency.

    Fixed it for bsp_quote.js in generate_css.php on line 157, replacing:

    
    wp_enqueue_script( 'bsp_quote', plugins_url('js/bsp_quote.js',dirname( __FILE__ )) ) ;
    

    with:

    
    wp_enqueue_script( 'bsp_quote', plugins_url('js/bsp_quote.js',dirname( __FILE__ )), array('jquery'), BSP_VERSION_NUM, true );
    

    Same probably needs to happen for enqueuing all other js files that use jQuery.

    Thanks for the hard work!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Uncaught ReferenceError: jQuery is not defined’ is closed to new replies.