PDA

View Full Version : .load(function() not working


surreal5335
05-08-2009, 07:08 PM
I have a piece of code which has worked great in the past on this very site, but for some reason now, has stopped working. I put in the .ready function to try and fix it bc I understand that is a crucial peice of syntax for jquery.

Still the code does not work. Everything in this code is not being executed, its like the code is being ignored.


<script type="text/javascript">
<!-- we run in the footer so no need to use onload -->
$(document).ready(function(){
$('#zoe img').load(function() {
$("#graphic").hide();
$("#illustration").hide();
$("#photography").hide();
$("table.contact").hide();
$("span.form").hide();
$("div.pics").hide();
$("img.gradualshine").hide();
$("#zoe").slideDown(3000, function(){
$("span#options").slideDown(1000);
$("img#photo").slideDown(1000);
$("img#illus").slideDown(1000);
$("img#grphc").slideDown(1000);
});
});
});
</script>


If you would like details on the rest of the code, it can be found at:

http://royalvillicus.com/photo_site/photo.php

Thanks a lot for all your help

Iszak
05-09-2009, 08:13 AM
try removing the #zoe img load event listener, because it may have already loaded when the document is ready. Because you should be able to hide the images once document ready occurs hence making the load event listener pointless. Either that or remove document ready and just use #zoe img load listener.

dungar pratap
05-09-2009, 09:40 AM
cool dude