Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2008
    Posts
    446
    Thanks
    23
    Thanked 5 Times in 5 Posts

    .load(function() not working

    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.

    Code:
    <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

  • #2
    Regular Coder Iszak's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Western Australia
    Posts
    332
    Thanks
    2
    Thanked 58 Times in 57 Posts
    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.

  • #3
    New to the CF scene
    Join Date
    May 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hi

    cool dude


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •