View Full Version : Referencing jquery.js and other files properly?

07-01-2012, 11:59 PM
Hello. I am new here and am trying to get jquery to work in a simple web page. I am using the following tutorial (series):


My problem is that it works if use the google hosted jquery.js file it works. However when I try to reference it to a file on my computer it isn't working. They are both exactly the same files, so I know I am not referencing it properly. I am using Ubuntu and the exact position of the jquery.js file is:


For my script type code and source I used:

<script type="text/javascript" src="/home/drew/Desktop/jqproj/js/jquery.js"></script>

I have also tried:
<script type="text/javascript" src="js/jquery.js"></script>

The index.html file is in the /pracproj folder. The jquery.js file is in the /js folder which is inside of the /pracproj folder.

What am I doing wrong?

07-02-2012, 12:47 AM
Why are you using your own copy of the library rather than one of the shared ones that your visitors are reasonably likely to already have on their computer so they don't have to download it.

You should use a shared copy of jQuery such as the Google copy to speed up loading of your page.