title: 0x800a1391 - JavaScript runtime error: 'jQuery' is undefined
body: <p>I have a ASP .Net MVC4 Web application. In it I have my usual html for the _Layout.cshtml, which in turn loads the default Home/Index. All works fine.</p>
  
  <p>In my index I am also loading a partial view. This works fine too. No probs.</p>
  
  <p>I am using a the UI tools from the following site:</p>
  
  <p><a href="http://www.keenthemes.com/preview/index.php?theme=metronic" rel="nofollow">http://www.keenthemes.com/preview/index.php?theme=metronic</a></p>
  
  <p>The problem is it seems to be primarily HTML4 and not designed for MVC out of the box so I am having to tweak it slightly to get it to work the way I want. (Nothing beyond anything very basic). For example, moving one part out to the index and using Renderbody() to load it so the actual html structure never changes. I have done this a million times to be sure I am not missing any closing tags or anything else  that could cause my problem.</p>
  
  <p>Up to this point there is no problem at all. Everything loads as it should.</p>
  
  <p>I continued to create a 2nd View and its partial to extract other parts of the site. As usual, baby steps first. Before extracting any other code, I just used a little "Hello World" in the first page, and a similar string in the partial to be sure it was working. It was.</p>
  
  <p>Now when I type in the url Home/ActionName the whole thing reloads as it should but looks horrible. and I get this error message:</p>
  
  <p>0x800a1391 - JavaScript runtime error: 'jQuery' is undefined</p>
  
  <p>Below is my code which clearly defines it:</p>
  
  <pre><code>&lt;!-- BEGIN CORE PLUGINS --&gt;
  &lt;script src="assets/plugins/jquery-1.8.3.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script&gt;
      jQuery(document).ready(function ()
      {
          App.init(); // initlayout and core plugins
          _Layout.init();
          _Layout.initJQVMAP(); // init index page's custom scripts
          _Layout.initCalendar(); // init index page's custom scripts
          _Layout.initCharts(); // init index page's custom scripts
          _Layout.initChat();
          _Layout.initDashboardDaterange(); //Red date range
          _Layout.initIntro(); //Pop up messages
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>It points me to the jQuery(document).ready part when I see the message.</p>
  
  <p>Again, when I load the page normally, it works fine. When I type Home on its own it works fine. Its only when I type Home/AnythingElse that it gives this error message. Even if I type Home/ which should load in the Index file, it gives me this error message.</p>
  
  <p>jQuery is defined, so why is this happening on postback?</p>
  
  <p>Any help is appreciated.</p>