问题解析:

出现这种错误,如果没有定义jQuery和$,那么最可能是JS文件加载顺序出了问题。

有的JS文件,特别是自己写的JS文件有的需要提前引入jQuery,所以jQuery总是放在前面。

jQuery is not defined,$ is not defined

 

 

查看加载顺序的一个小技巧,判断方法:

以谷歌浏览器为例,如下图的步骤:

jQuery is not defined,$ is not defined

 

顺序,从上到下。

希望能帮助到各位。

相关文章:

  • 2021-09-23
  • 2021-12-28
  • 2021-10-19
  • 2021-11-16
  • 2021-11-28
  • 2021-09-16
  • 2021-04-21
  • 2021-09-27
猜你喜欢
  • 2021-11-29
  • 2021-04-27
  • 2021-10-09
  • 2021-11-10
  • 2021-06-27
  • 2021-11-01
  • 2021-04-08
相关资源
相似解决方案