Twitter的引导.Bootstrap javascript工作,但其他脚本不会


Twitter bootstrap. bootstrap javascript is working but others script wont

我想知道为什么我的其他脚本不工作,但bootstrap.js正在工作。我这里有我的代码为我的函数。php调用脚本。

<?php
/*Linking of CSS Child Theme to Parent Theme + JavaScript*/
function theme_add_bootstrap()
{
    wp_enqueue_style( 'bootstrap-css', get_template_directory_uri() . '/css/bootstrap.css' );
    wp_enqueue_style( 'custom-css', get_template_directory_uri() . '/css/custom.css' ); <!--Working Javascript -->
    wp_enqueue_script( 'bootstrap-js', get_stylesheet_directory_uri().'/js/bootstrap.js', array( 'jquery' ) );
    wp_enqueue_script( 'custom-js', get_stylesheet_directory_uri().'/js/custom.js', array( 'jquery' ) );
    wp_enqueue_script( 'jquery-easy-min-js', get_stylesheet_directory_uri().'/js/jquery.easy.min.js', array( 'jquery' ) );
    wp_enqueue_script( 'jquery-1-js', get_stylesheet_directory_uri().'/js/jquery-1.11.0.js', array( 'jquery' ) );
}
add_action( 'wp_enqueue_scripts', 'theme_add_bootstrap' );

其他3个脚本(custom.js, jquery.easy.min.js和jquery-1.11.0.js)在LOCALHOST中运行良好。然而,当我上传我的wordpress网站。该脚本不再起作用。有人能帮帮忙吗?顺便说一下,这3个脚本是用于页面滚动的

也许你把'jquery'拼错为'jquery' ?

wp_enqueue_script( 'jquery-1-js', get_stylesheet_directory_uri().'/js/jqeury-1.11.0.js', array( 'jquery' ) );

但是如果不是拼写错误,那么也许你加载了两次jQuery,因为jqeury-1.11.0.js 看起来像jQuery本身。在这种情况下,去掉这条线。Wordpress有它自己的jQuery,你第一次把array('jquery')作为一个依赖项放在wp_enqueue_script语句中加载它。

在引导前添加jQuery。Bootstrap取决于它

我认为你必须把jquery放在脚本的顶部,这样它才能正常工作