0

As the title suggests, what i am trying to do is wait for the body background image to load and then animate a couple of things in the page.

The background image is set as a background through CSS.

I found this solution but it doesn't seem to work for me Trigger event on background image load (throws an error)

Community
  • 1
  • 1
tsiger
  • 1,607
  • 2
  • 15
  • 16

1 Answers1

2

You may try to use your animation code in

$(window).load(function(){  
    //initialize after images are loaded  
});  

instead of document-ready construction

kubum
  • 469
  • 2
  • 13
  • yeah that could work, thing is that solution is waiting for all the images to be loaded. I just want to trigger the animation of some elements as soon as the page background image is loaded. – tsiger Jan 28 '11 at 14:17