bg17aw bg17aw - 4 months ago 31x
jQuery Question

Not able to load jQuery in Internet Explorer on localhost (WAMP)

I have a standard piece of HTML but cannot get jQuery to work on IE.
I tried IE10 and IE11, as well as IE8 and 9 emulated in IE10.

I even tried using the code from HTML5Boilerplate. I am testing for jquery and is not loaded.

Code works in all other browsers. I am running this on my local, not on a server.

<!DOCTYPE html>

<script src="//"></script>


<script type="text/javascript">
if (window.jQuery) {
// jQuery is available.
} else {
console.log("-- no jquery --");



Why can't I get this to work in IE ?

I get
-- no jquery -- SCRIPT5007: The value of the property '$' is null or undefined, not a Function object
in the console.

Also, if I type
in the console, I get

Network tab is not displaying any errors.


Quote OP:

I am running this on my local, not on a server

Then you need to specify a scheme, otherwise the browser may assume that src="//" is src="file://", which will break since you're not hosting this resource locally.