 <p>You are probably accessing the file locally, which won't work with a protocol-relative script tag.</p> <pre><code>&lt;!-- access from http resolves to this --&gt; &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt; &lt;!-- local access resolves to this --&gt; &lt;script src="file://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt; </code></pre> <p>The file wouldn't have existed locally, and the script would've never been loaded. Therefore, the variable <code>$</code> would then be undefined.</p>