ASP.NET page in subdirectory: $(document).ready() only works if I'm using CDN-hosted version of jQuery
<p>I'm a little stumped by this. I have an ASP.NET web application, and I'm using the stock version of jQuery that ships with VS2010, 1.4.1 (though I can reproduce this issue in later versions of jQuery).  </p>

<p>I have a <strong>Default.aspx</strong> page in the root folder of my web application, and in it, is this:</p>

<pre><code>&lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt;
    &lt;h2&gt;
        Some content here...
    &lt;/h2&gt;

    &lt;script src="Scripts/jquery-1.4.1.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      $(document).ready(function () {
          alert("Page loaded, awesome!")
      });
    &lt;/script&gt;
&lt;/asp:Content&gt;  
</code></pre>

<p>That works great. Now, I also have a <strong>Login.aspx</strong> page sitting in the stock <strong>Account</strong> subfolder of a new ASP.NET web application. On this page, this <strong>does not work</strong>:  </p>

<pre><code>&lt;asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"&gt;
    &lt;h2&gt;
        Imagine there are some Log In controls in here...
    &lt;/h2&gt;

    &lt;script src="~/Scripts/jquery-1.4.1.js" type="text/javascript"&gt;&lt;/script&gt;
    &lt;script type="text/javascript"&gt;
        $(document).ready(function () {
           alert("Page loaded, awesome!")
        });
    &lt;/script&gt;
&lt;/asp:Content&gt;  
</code></pre>

<p>However, as soon as I change to something like this (using the CDN hosted version of jQuery)... </p>

<pre><code>&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    $(document).ready(function () {
       alert("Page loaded, awesome!")
    });
&lt;/script&gt;  
</code></pre>

<p>...then things work great. I'm assuming there is something that I'm doing something wrong regarding the path I'm using to my local copy of jQuery, but I can't quite figure out what I'm doing wrong. I shouldn't need to use a CDN hosted copy of jQuery, especially when a local copy works on pages in the root folder of my web application. Any ideas?</p>
