我有一个WP自定义模板,我的jquery文件加载完全但不是我的javascript文件,我已经尝试了一切在我的服务器上运行它们,但它们不在任何地方它们不在代码中也不在net标签中,在所有浏览器中进行了检查,它在Local中完美运行。
wp_register_script( 'cltvo_functions_js', JSPATH.'functions.js', array('jquery', 'validate', 'swiper', 'scrollIt'), false, true );
wp_localize_script( 'cltvo_functions_js', 'cltvo_js_vars', cltvo_js_vars() );
wp_register_script( 'anm', JSPATH.'anm.js', array('jquery'), false, true ); //Everything allright with them
wp_register_script( 'validate', JSPATH.'jquery.validate.js', array('jquery'), false, true ); //Everything allright with them
wp_register_script( 'scrollIt', JSPATH.'scrollIt.js', array('jquery'), false, true ); //Everything allright with them
wp_register_script( 'swiper', JSPATH.'swiper.jquery.min.js', array('jquery'), false, true ); //Everything allright with them
wp_register_script( 'p5dom', JSPATH.'p5.dom.js', array(), NULL, false );//loaded on local but not in server
wp_register_script( 'p5', JSPATH.'p5.js', array(), NULL, false );//loaded on local but not in server
wp_register_script( 'p5sound', JSPATH.'p5.sound.js', array(), NULL, false );//loaded on local but not in server
wp_register_script( 'sketch', JSPATH.'sketch.js', array(), NULL, true );//loaded on local but not in server
wp_localize_script( 'sketch', 'cltvo_js_vars', cltvo_js_vars() );//loaded on local but not in server
wp_enqueue_script('p5');
wp_enqueue_script('p5dom');
wp_enqueue_script('p5sound');
wp_enqueue_script('sketch');
wp_enqueue_script('jquery');
wp_enqueue_script('cltvo_functions_js');
这是我在本地看到的: local view in all browsers
这是我在服务器上看到的内容:server view in all browsers