我正在尝试实现星际插件,据我所见,我已经包括了所有必要的js。但是,在dev工具控制台中,我一直得到“Uncaught:$(.).stellar不是函数”。
这就是我在头上的标签:
<!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>
这是错误引用的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",
});
});请帮帮我
发布于 2015-05-18 07:53:57
我发现问题出在js/供应商/jquery.js上,我忘记了把它放在index.html文件的底部。当我移除它的时候,恒星功能起了作用。不过,不知道这对stellar.js有何影响。
发布于 2018-07-03 09:30:33
https://stackoverflow.com/questions/30295159
复制相似问题