我将引导主题转移到WordPress,并试图在functions.php中添加JavaScript文件,并且执行显示没有错误:
但没有任何效果。
js文件在这里:js文件
我的dev控制台输出是:
TypeError: $ is undefined carousel.js:3:6079 http://localhost/wordpress/wp-content/themes/bootgotya/js/carousel.js?ver=1:3
TypeError: $ is not a function flexslider.js:14:2 http://localhost/w
我看到了许多类似的发行,但没有解决我的问题。我使用的是柔性滑块2.2.0,当我实现淡出动画时,这个功能在Firefox版本30中被破坏了。在IE,Chrome等方面没有问题。我使用以下代码
<script src="site/flexslider/jquery.flexslider.js"></script>
<script>
jQuery(document).ready(function($) {
// You can use the locally-scoped $ in here as an alias to jQuery.