...

View Full Version : Trying to get Jquery scroll working / installing the jquery library



HannahS
03-26-2012, 08:31 PM
Hi, this is my first ever post and i'm very new to coding so i hope i can explain this properly.

I want to create a website similar to www.facepark.org, i'm aware this one was built in flash but my teacher said it should be possible to make using jquery.

I found a website with the code that i need to allow the user to scroll around the website but as far as i can understand it to allow this code to work you have to install the jquery library first.

So i have downloaded the jquery library from jquery.com and the put this download into my website folder.

I then read on the site that i should write this:


<script type="text/javascript" src="jquery-1.7.1/jquery.min.js"></script>
</head>

to make it look for the library.

Now in dreamweaver the jquery.min.js appears in a seperate tab to the rest of my source code and when i click on it it says jquery.min.js is not on the local disk and when i click 'get' it says that its not in the defined site.

I've tried to research to find out what i'm doing wrong but i can't find it anywhere and i'm very confused. I hope i've managed to explain this so it makes sense!

I'd be extremely grateful if anyone could offer any advice or even give me an idea of where to look for help!

Thank you

Hannah

VIPStephan
03-26-2012, 09:18 PM
Make sure the file path to the jQuery file is correct. According to the code you posted, a file called “jquery.min.js” needs to be in the directory “jquery-1.7.1”. This doesn’t sound like the usual set-up, though. How is your jQuery file called and where have you stored it (in relation to the HTML file)?

HannahS
03-26-2012, 09:31 PM
Hi thank you for replying,

My jquery file is called jquery.min.js and it is saved in the same folder where my html files is saved. This is a folder that dreamweaver automatically created and is called unnamed site 2 and is just saved to my desktop.

I've now changed the code so that it reads:

[CODE] <script type="text/javascript" src="jquery.min.js"></script>
</head> [CODE]

So this should mean that its looking in the right place shouldn't it?

The same thing problem is still happening though.

VIPStephan
03-26-2012, 09:40 PM
If the HTML file and the JS file are in the same directory/on the same level then it should actually load it. Try this: Preview the HTML file in a browser of your choice and then in the address bar replace the HTML file’s name by the JS file name. It should show the JS file in the browser. If it does then the error is somewhere else. The error console that’s built into most browsers should also be able to give some info.

It would help if you would put your site online somewhere and show us a link so we can check it out ourselves.

And P. S.: If you post code then do it as in HTML, close the tags properly. It must read
(with the slash in the closing tag).

HannahS
03-26-2012, 10:04 PM
I've got it working now, by previewing it i could see that some of the files were in the wrong place. Thank you so much for your help and i will remember your tips for the next time i post.

Thank you!

Hannah



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum