Revision: 56199
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 15, 2012 14:34 by focal55
Initial Code
<script>
$(function () {
var img = new Image();
$(img).load(function () {
$(this).hide();
$('#loader').removeClass('loading').append(this);
$(this).fadeIn();
}).error(function () {
// notify the user that the image could not be loaded
}).attr('src', 'http://farm3.static.flickr.com/2405/2238919394_4c9b5aa921_o.jpg');
});
</script>
Initial URL
Initial Description
Thank you marcg for posting this on Snipplr http://stackoverflow.com/questions/1379994/detect-when-a-specific-image-has-finished-loading
Initial Title
Show Preloader while loading Images with JQuery
Initial Tags
image
Initial Language
jQuery