fade in all divs of a page. once the content of the divs is loaded
Posted
by daniel
on Stack Overflow
See other posts from Stack Overflow
or by daniel
Published on 2010-03-09T06:09:25Z
Indexed on
2010/03/09
6:36 UTC
Read the original article
Hit count: 282
I want all the divs on my page to fade in after the content is loaded.
The code below loads in all imgs in the #div container. Which is great. but it does not load in images that are used as div background images loaded through the css file. So i think the most effective way is to create a piece of code that fades in all the divs on the page after the content ie: images and text has loaded. Is there A way to do this.
Cheers.
$(document).ready(function() {
$('#container img').fadeIn(4000);
// and tell pending images to do the same, once they've finished loading:
$('#container img').load(function () {
$(this).fadeIn(4000);
});
});
© Stack Overflow or respective owner