-2

No little errors. I've tried many, many different times on many, many projects, and jQuery will not load. I've tried dowloading jQuery files as well as using jQuery URLs. I've checked for typos, made sure the files are in the right spots, made sure the jQuery script is loaded before jQuery commands are used, and ruled out just about every minor error in the book. My best lead was a thread about encoding. For whatever reason, someone's html file was being encoded into UTF-16, and jJQuery into UTF-8. I'm using Notepad++, and I checked, and of course, my HTML and jQuery files are both being encoded in UTF-8 (without BOM). I'd just like to use the library and move with my life, so if someone could help me, that would be marvelous.

If it counts for anything, here's my code to embed jQuery:

<script type="text/javascript" src="jquery-2.0.3.min.js"></script>
user1743825
  • 21
  • 1
  • 2
  • 8
  • Is it placed in ``? – wei2912 Sep 15 '13 at 07:06
  • Unfortunately, it is. – user1743825 Sep 15 '13 at 07:07
  • Can you provide the link to the page itself. Or just try `` instead. – rfoo Sep 15 '13 at 07:12
  • Unfortunately, I don't have a server for it. I copy and pasted that, though it didn't work. Would pasting more of my code help? – user1743825 Sep 15 '13 at 07:19
  • Yes, we need at least the `` section and how you know it isn't loaded (probably based on the code you tried). – wei2912 Sep 15 '13 at 07:24
  • Just to be 100% sure. You are not accessing a server at all to test your code? If you are developing locally you have a webserver running on your local machine? Do your websites display properly in terms of markup and styles? does raw javascript work fine? – DGS Sep 15 '13 at 07:29

2 Answers2

0

Your jquery file jquery-2.0.3.min.js might not be in same folder as your HTML file. Try looking into the console for error and update your path.

Ashis Kumar
  • 6,494
  • 2
  • 21
  • 36
  • They're in the same folder, sadly. – user1743825 Sep 15 '13 at 07:12
  • Not that I'm aware of. At the risk of sounding like an idiot (well, I think my question already does that), I don't know what kind of error to be looking for from the console. But no, no pop up windows saying something's wrong or anything like that. – user1743825 Sep 15 '13 at 07:20
  • The error you would most likely find would be something like `$ is undefined` or `jQuery is undefined` depending on how you reference jQuery in your code. – DGS Sep 15 '13 at 07:26
0

Place the tag at the bottom before the closing tag. It seems you might be trying to use the jQuery before it's available to the browswer.