Is there a way to know how much percentage of one image is already loaded? Kind of a onProgress
event for the load? So if I would do something like this开发者_如何学Python:
$('<img/>').load(function(){
$(this).appendTo(some div);
})
.error()
.attr('src',some source);
I could have some progress bar indicating how much of the previous load is complete.
There isn't a way to detect/get this information, it just isn't exposed to JavaScript at all...only the onload
when it's finished is fired (or onerror
, if it fails).
精彩评论