Why is $ undefined when jQuery is loaded?
<p>I have this in the head of a page:</p>

<pre><code>&lt;script type="text/javascript" src="scripts/jquery-1.9.1.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
    $(function () {
        $("#ListBoxSegment").change(function () {
            GetAccountOpportunityTypes($(this).val());
        });
        $("#ListBoxType").change(function () {
            GetNumberOfContacts();
        });
    });
</code></pre>

<p>Running the page gives this error:</p>

<pre><code>0x800a1391 - Microsoft JScript runtime error: '$' is undefined
</code></pre>

<p>Why is $ undefined when jQuery is loaded in the line above?</p>

<p>IT WAS FIXED BY LOADING FROM THE URL: </p>

<pre><code> &lt;script src="http://code.jquery.com/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
</code></pre>

<p>But still a little strange that it wouldn't load from local.</p>
