View Full Version : Right code but won't work when I upload to FTP

06-19-2012, 10:59 PM
Hey everyone, I believe I have the right code, and it works fine on localhost, but when I upload it to FTP, it doesn't work live.

the website is : www.theurbanape.com

Here is the code: (ps. it is linked to jquery-1.4.1.min.js)

<strong></strong><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<link rel="stylesheet" href="style.css" type="text/css" />
<title>Urban Ape</title>

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

<script type="text/javascript">
$(document).ready(function() {
$("body").css("display", "none");
linkLocation = this.href;
$("body").fadeOut(1000, redirectPage);

function redirectPage() {
window.location = linkLocation;

<div class="center"><a href="intropage.html" class="transition"><img src="Images/apecity.jpg" alt="test image" title="Enter The Jungle" height="400" width="400" /></a></div>


Old Pedant
06-19-2012, 11:14 PM
And what, pray tell, does "doesn't work" mean?

The page loads, so something works.

And your HTML is illegal. You aren't allowed to have anything before the <!DOCTYPE ...> and you have <strong></strong>

Old Pedant
06-19-2012, 11:17 PM
Okay...I see it.

Look at the error console.

It says $ is undefined. Which means jQuery isn't defined.

Maybe you forgot to upload jQuery to your site (it certainly isn't there). But it would be a better idea to use jQuery from some known repository (e.g., Google), anyway.

06-19-2012, 11:25 PM
What exactly isn't working about it? Is the original image supposed to fade in when you first get to the page? Then you want it to fade out and the new page will fade in once you click the image? You do realize that you've set the fade in speed for the original page to 3 seconds and the fade out (onclick) to 1 second, right? Have you tried adjusting those?

Don't know if that's the issue or if you've got some other problems with your code. Or maybe I've completely misunderstood the question :)

EDIT: Old Pendant is correct. Your link to the jquery file returns a 404 (not found) error.

06-20-2012, 12:49 AM
I apologise for the ambiguous post. It should load in (3 seconds) and then fade out once clicked in one second?

Which it does fine in localhost, but not FTP.

Thanks for the replies