The append is done immediately, but you have to wait for the load
event of the image before you can get the correct height.
by(e)
Stephan
2009/2/2 lhwpa...@googlemail.com lhwpa...@googlemail.com:
is there any way to get a callback when append is ready?
i have the following problem. i add
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
great! thanks for that! one last question. is it possible to fire a
function when the last of 5 images is loaded ?
ok thanks, and is there any way to use the load event to an image
included with append?
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 ?
sure, no problem
take a look at:
http://jsbin.com/udeze/edit
by(e)
Stephan
2009/2/2 lhwpa...@googlemail.com lhwpa...@googlemail.com:
ok thanks, and is there any way to use the load event to an image
included with append?
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
7 matches
Mail list logo