...

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



Drew012
07-01-2012, 10: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):

http://www.youtube.com/watch?v=DWovwudaP94&feature=fvwrel

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:

/home/drew/Desktop/pracproj/js

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?

felgall
07-01-2012, 11:47 PM
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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum