I have many div.image, each one has a huge size. How do I append a loader image when the div background is loading and remove the loader image after the background finished loading?
$('.image').append('<img src="image/loading.gif" class="loading" />');
<div class="image" style="background:url(https://lh3.googleusercontent.com/-3prblPgZ3n4/To9btWmWSFI/AAAAAAAAB2c/Ojs-7Ql3r6w/s720/DSC_2120.JPG) 0 0 no-repeat;width:720px;height:478px;overflow:hidden;"></div>
HERE is a different version (that works):
Fiddle: http://jsfiddle.net/maniator/ucdju/