$.post("service.php", { GetStartpageImages : true },function(data) {
$.each(data,function(i, value){
var path = "uploads/thumb_" + value.Filename;
$('.startpage-images').append(
'<div class="imagewrapper clearfix">' +
'<a class="imagelink" href="?p=photo&id=' + value.ID + '">' +
'<img src="'+ path +'"/></a>' +
'<div class="imageinfo alpha70">'+ value.UploadTimestamp +'</div>' +
'</a>' +
'</div>');
});
});
How can i show them once they are loaded? $(window).load.. didnt work for me. Thanks
This should do it:
The above code assumes that in your css you have
.imagewrapper {display:none}. Once the image has been fully loaded,imgLoadCallback()will be called. Even if the user has the image in their cache, it will still be called (immediately, in that case).