问题解析:

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

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

jQuery is not defined,$ is not defined

 

 

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

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

jQuery is not defined,$ is not defined

 

顺序,从上到下。

希望能帮助到各位。

相关文章:

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