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
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.