[jQuery] Re: how to fade in image after the site loads?

2009-02-12 Thread Paul Mills
Hi, Try something like this: $('#photo img').load(function() { $('.pic').fadeIn(); $('div.position').fadeOut(); $('.site').fadeIn(); }); The .load() event should fire when the images has loaded. You don't need to remove the classes pic and site to get the fades in/out to work. Paul On Feb

[jQuery] Re: how to fade in image after the site loads?

2009-02-12 Thread surreal5335
Thanks a lot for the help, unfortunately it didnt take. One more thing, how could I go about getting the $('.site').fadeIn(); to execute after the other two have finished? I wish I could offer some suggestions to help spark an idea on your end, but I am drawing a complete blank...Which is why I

[jQuery] Re: how to fade in image after the site loads?

2009-02-12 Thread Paul Mills
Hi again, Sorry that didn't work. It might be interacting with something else in your HTML or JS. You can chain effects together by using a callback function so to chain all three you would do this: $(document).ready(function(){ $('#photo img').load(function() { $('.pic').fadeIn(4000,

[jQuery] Re: how to fade in image after the site loads?

2009-02-12 Thread Ricardo Tomasi
The 'load' event doesn't fire in Internet Explorer if the image is cached, maybe that's why. $('#photo img').bind('load readystatechange', function(e) { if (this.complete || this.readyState == 'complete' e.type = 'readystatechange') { $('.pic').fadeIn(); $('div.position').fadeOut();