I do not want to use jquery lazyload. because I want 开发者_StackOverflow社区loading done all the pictures then show at the same time, not loading one by one.
I know some thing like this, but how to make a judge when all the images are loaded, then remove the loading.gif
? thanks.
$("div#content").prepend("<img src='../loading.gif' class='ldrgif' / >");//add a image
...//loading images in div#content
$(this).find("img.ldrgif").remove(); //remove it, how to make a judge all the images are loaded?
Here's a neat example: http://jsfiddle.net/5Y3dW/
精彩评论