Jump to content

Why isn't my javascript working?


AndrewC14

Recommended Posts

Hi guys, this is a total noobish bit of code but I'm just trying to learn (so I apologize for my noobishness in advance!)

 

I want 'loading...' to appear before an image but my javascript doesn't seem to be working?

 

here is my code:

 

<html>
<head>
<link rel="stylesheet" type="text/css" href="http://xzen.co.uk/wp-content/themes/template_29415_1DhpK1xU3ddbLHbaThPI/theme1069/style.css" media="all">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(window).ready(function(){
    $("#image").load(function(){
        $("#waiter").fadeOut(function(){
            $("#image").fadeIn();
        });
    });
});?
</script>
</head>
<body>
<div id="waiter">Loading...</div>
<img src="http://xzen.co.uk/wp-content/uploads/2012/05/newFBhotbin.png" id="image">
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/262128-why-isnt-my-javascript-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.