Take notice that the image's load event doesn't always fire in IE. You
have to use

.bind('readystatechange load', loaded)

function loaded(){
 if (this.complete) // or if (this.readyState == 'complete')
   //do stuff

to guarantee that the function will be called (the .complete property
is always true on FF, and it doesnt fire readystatechange for images).

cheers,
- ricardo

On Feb 2, 4:17 pm, Stephan Veigl <stephan.ve...@gmail.com> wrote:
> You can make a function you call every time an image has been loaded
> and update a counter in this function. Once the counter reaches the
> number if images you have on your page, you know that all images where
> loaded.
>
> see:http://jsbin.com/ofici/edit
>
> by(e)
> Stephan
>
> 2009/2/2 Liam Potter <radioactiv...@gmail.com>:
>
>
>
> > can you please not delete the quoted message, as I have no idea what you
> > just thanked someone for now.
>
> > lhwpa...@googlemail.com wrote:
>
> >> great! thanks for that! one last question. is it possible to fire a
> >> function when the last of 5 images is loaded ?

Reply via email to