未捕获的类型错误:$(…).恒星不是一个函数

Uncaught TypeError: $(...).stellar is not a function

本文关键字:恒星 函数 一个 类型 错误      更新时间:2023-09-26

我正在努力实现恒星插件,据我所见,我已经包含了所有必要的js。然而,在开发工具控制台,我一直得到'Uncaught TypeError: $(…)。恒星不是一个函数。

这是我在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>

这是错误所指向的script .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",
     });
});

请帮帮我

我发现问题是与js/vendor/jquery.js这是我忘记了,已经放在index.html文件的底部。当我把它移开时,恒星函数起作用了。不知道为什么会影响到stellar.js

  1. 为布局页面添加javascript链接。
  2. 从内页删除脚本链接