'JQuery' is undefined

前端 未结 19 1397
生来不讨喜
生来不讨喜 2020-12-28 15:21

I am working on a ASP.net project created with local file system settings. I am using MVC and Jquery. Jquery is working fine when I run the application in debug mode i.e. in

19条回答
  •  有刺的猬
    2020-12-28 16:11

    One additional reason for this error I found out occurs if you are loading jQuery from a cdn and a local script from your server. They load independently, so if the local script finishing before the jQuery it will also be executed before, which gives us the lovely error. This is especialy an issue if jQuery is not in the browsercache so you might see this error occur on the first time the scripts loads and vanish later.

提交回复
热议问题