我不知道我做错了什么。。。我正在使用初学者木材主题。。。我正在尝试取消滑动以处理我的主题。。。这里指出的是我在从函数中放入脚本时所做的正确证明。php。。。
<script type=\'text/javascript\' src=\'http://localhost/luxjeweler/wp-content/themes/timber-starter-theme-master/includes/js/jquery.js?ver=1\'></script>
<script type=\'text/javascript\' src=\'http://localhost/luxjeweler/wp-content/themes/timber-starter-theme-master/includes/resources/bootstrap/js/bootstrap.min.js?ver=1\'></script>
<script type=\'text/javascript\' src=\'http://localhost/luxjeweler/wp-content/themes/timber-starter-theme-master/includes/js/bootstrap-wp.js?ver=1\'></script>
<script type=\'text/javascript\' src=\'http://localhost/luxjeweler/wp-content/themes/timber-starter-theme-master/includes/js/skip-link-focus-fix.js?ver=1\'></script>
<script type=\'text/javascript\' src=\'http://localhost/luxjeweler/wp-content/themes/timber-starter-theme-master/includes/unislider/js/unslider-min.js?ver=1\'></script>
<script type=\'text/javascript\' src=\'http://localhost/luxjeweler/wp-content/themes/timber-starter-theme-master/includes/js/stickyFooter.js?ver=1\'></script>
<script type=\'text/javascript\' src=\'http://localhost/luxjeweler/wp-content/themes/timber-starter-theme-master/script.js?ver=1\'></script>
<script type=\'text/javascript\' src=\'http://localhost/luxjeweler/wp-includes/js/wp-embed.min.js?ver=4.4.2\'></script>
但不知何故jquery不起作用。。。尝试使用wordpress提供的jquery排队默认值和自定义排队,但未成功。。。我尝试使用以下简单代码进行测试:
$(document).ready(function(){
alert("test");
});
刷新页面时没有响应。。。
编辑(15-02-16):
这是我的排队功能:
function luxjewels_scripts() {
// Import the necessary TK Bootstrap WP CSS additions
wp_enqueue_style( \'luxjewels-bootstrap-wp\', get_template_directory_uri() . \'/includes/css/bootstrap-wp.css\', false, \'1\');
// load bootstrap css
wp_enqueue_style( \'luxjewels-bootstrap\', get_template_directory_uri() . \'/includes/resources/bootstrap/css/bootstrap.css\', false, \'1\' );
// load Font Awesome css
wp_enqueue_style( \'luxjewels-font-awesome\', get_template_directory_uri() . \'/includes/css/font-awesome.min.css\', false, \'1\' );
// load styles
wp_enqueue_style( \'luxjewels-style\', get_stylesheet_uri() );
wp_enqueue_style( \'luxjewels-unslider\', get_template_directory_uri() . \'/includes/unslider/css/unslider.css\', true, \'1\');
wp_enqueue_script( \'luxjewels-jquery\', get_template_directory_uri() . \'/includes/js/jquery.js\', array(), \'1\', true );
// load bootstrap js
wp_enqueue_script(\'luxjewels-bootstrapjs\', get_template_directory_uri().\'/includes/resources/bootstrap/js/bootstrap.min.js\', array(), \'1\', true);
// load bootstrap wp js
wp_enqueue_script( \'luxjewels-bootstrapwp\', get_template_directory_uri() . \'/includes/js/bootstrap-wp.js\', array(), \'1\', true);
wp_enqueue_script( \'luxjewels-skip-link-focus-fix\', get_template_directory_uri() . \'/includes/js/skip-link-focus-fix.js\', array(), \'1\', true );
// load Unslider js and css
wp_enqueue_style( \'luxjewels-unslider-dots\', get_template_directory_uri() . \'/includes/unslider/css/unslider-dots.css\', false, \'1\', true);
wp_enqueue_script(\'luxjewels-unslider-min\', get_template_directory_uri().\'/includes/unslider/js/unslider-min.js\', array(), \'1\', true);
// load stickyfooter js
wp_enqueue_script( \'luxjewels-stickyfooter\', get_template_directory_uri() . \'/includes/js/stickyFooter.js\', array(), \'1\', true );
// load custom js
wp_enqueue_script( \'luxjewels-custom-script\', get_template_directory_uri() . \'/script.js\', array(), \'1\', true );
}
add_action( \'wp_enqueue_scripts\', \'luxjewels_scripts\' );