Seb*_*Seb 8 html javascript jquery
我试图实现恒星插件,我可以看到,我已经包括了所有必要的js.但是,在dev工具控制台中,我不断得到'Uncaught TypeError:$(...).stellar不是函数'.
这就是我在head标签中的含义:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UFT-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>QE | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
<link rel="stylesheet" href="css/stuff.css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script src="js/jquery.stellar.js"></script>
<script src="js/scrip.js"></script>
<script src="js/jquery.nicescroll.js"></script>
Run Code Online (Sandbox Code Playgroud)
这是错误所指的scrip.js文件:
$(document).ready(function() {
$(window).stellar();
});
$(document).ready(
function() {
$("html").niceScroll({
cursorcolor:"rgba(30,30,30,.5)",
zindex:999,
scrollspeed:100,
mousescrollstep:50,
cursorborder:"0px solid #fff",
});
});
Run Code Online (Sandbox Code Playgroud)
请帮我
我发现问题出在 js/vendor/jquery.js 上,我忘记了它已将其放在 index.html 文件的底部。当我删除它时,恒星功能就起作用了。但不知道为什么这会影响 stellar.js。