做一个项目的时候 ,控制台总是会出现各种bug,其实不用慌张,终结起来也就几种类型的错误,在开发中每次遇到错误都善于总结,下次在看到就会胸有成竹知道是什么情况了,以下是在开发过程中总结的一些错误以及错误的解决方法。
报错一:Uncaught ReferenceError: $ is not defined
Uncaught ReferenceError: $ is not defined
Uncaught ReferenceError: jQuery is not defined
报错三:Uncaught TypeError: $(...).tooltip is not a function
Uncaught TypeError: $(...).tooltip is not a function
at HTMLDocument.<anonymous> (app.js:42)
at l (jquery.min.js:4)
at Object.fireWith [as resolveWith] (jquery.min.js:4)
at Function.ready (jquery.min.js:4)
at HTMLDocument.S (jquery.min.js:4)
像这样使用它,解决了我的问题!
报错四:Uncaught TypeError: $(...).sortable is not a function
Uncaught TypeError: $(...).sortable is not a function
at HTMLDocument.<anonymous> (dashboard.js:12)
at l (VM552 jquery.min.js:4)
at Object.fireWith [as resolveWith] (VM552 jquery.min.js:4)
at Function.ready (VM552 jquery.min.js:4)
at HTMLDocument.S (VM552 jquery.min.js:4)