views:

36

answers:

1

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

$('<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.

Thanks

+1  A: 

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).

Nick Craver
Damn! Thanks anyway!
Ricardo