Wednesday, July 20, 2016

0x800a1391 - JavaScript runtime error: '$' is undefined

Problem:

I had decided to upgrade to a newer version of bootstrap datepicker.  I had a new MVC project which started giving me this strange jquery error.


Solution:

The problem I ran into when getting this error was due to the fact that the following statements were not in the <head> of the document, but just before the </body> tag at the end of the document.
@Scripts.Render("~/bundles/jquery")
@Scripts.Render("~/bundles/jqueryui")
@Scripts.Render("~/bundles/bootstrap")
Once I moved them to the <head> of my .cshtml file, everything worked fine.


Source:

http://stackoverflow.com/questions/17672643/0x800a1391-javascript-runtime-error-jquery-is-undefined-mvc-4

No comments:

Post a Comment