March 1, 201313 yr I've always used <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> in the head tag of my project and never had any problems but today jquery is somehow not loading. I haven't changed anything in my project and it worked yesterday plus it works when I load a different version. I also double checked that I don't have two versions running. Does this mean this version is unavailable on google? I suppose I could download it but it has always been very reliable. Am I missing something?
March 1, 201313 yr Is your page displaying any JavaScript errors? If you're using Chrome, FF or IE, hit F12 to load the corresponding console. Other than that, I'm not sure. I've never come across this issue myself! Edited March 1, 201313 yr by Lyndsey
March 1, 201313 yr Author Yeah it basically says that jquery is undefined: ReferenceError: $ is not defined [Stopper sur une erreur] $(document).ready(function() { ReferenceError: jQuery is not defined [Stopper sur une erreur] ...;"></div>').appendTo("body"),e=20===d[0].offsetTop||15===d[0].offsetTop;d.remove... jquery...v=2.1.4 (ligne 45) ReferenceError: $ is not defined [Stopper sur une erreur] $(document).ready(function() { index.html# (ligne 268) ReferenceError: $ is not defined [Stopper sur une erreur] $(document).ready(function() {
March 1, 201313 yr Author It works if I get it directly off jquery.com so maybe I'll leave it at that. <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.1.1.min.js"></script>
March 1, 201313 yr Is the error still there? I've just added that script to one of my own pages and I'm not having any issues. Usually in my experience, the undefined error relates to a jQuery conflict (multiple instances of jQuery) but if you're sure that this isn't the issue then I'm stumped.
March 1, 201313 yr @OP In your example, you seem to be missing http: OP is using Google's hosted jQuery library, and the use of http: isn't necessary. See here for more information :https://developers.google.com/speed/libraries/devguide#jquery Lyndsey.
March 1, 201313 yr OP is using Google's hosted jQuery library, and the use of http: isn't necessary. See here for more information :https://developers.google.com/speed/libraries/devguide#jquery Lyndsey. It's not necessary when you run from a server. But the http: is needed if you test locally. At least for me, i'm on windows
March 1, 201313 yr OP is using Google's hosted jQuery library, and the use of http: isn't necessary. See here for more information : removed. Lyndsey. My apologies, I'm used to self hosting jQuery
March 1, 201313 yr My apologies, I'm used to self hosting jQuery No need for apologies. I think you've spotted the error. If mantis is testing localy without http: that would be it.
March 1, 201313 yr It's not necessary when you run from a server. But the http: is needed if you test locally. At least for me, i'm on windows Thanks for explaining it better
March 1, 201313 yr Author Cheers! That was it. I was indeed testing on a local server and I copied/ pasted the code from my last project which I worked on live and on Mac. Many thanks to all of you. Its lovely to come back from lunch and have your problem solved while you were gone. Edited March 1, 201313 yr by mantis
Create an account or sign in to comment