[jQuery] Re: callback for append function?

2009-02-02 Thread Stephan Veigl
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

[jQuery] Re: callback for append function?

2009-02-02 Thread Stephan Veigl
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

[jQuery] Re: callback for append function?

2009-02-02 Thread lhwpa...@googlemail.com
great! thanks for that! one last question. is it possible to fire a function when the last of 5 images is loaded ?

[jQuery] Re: callback for append function?

2009-02-02 Thread lhwpa...@googlemail.com
ok thanks, and is there any way to use the load event to an image included with append?

[jQuery] Re: callback for append function?

2009-02-02 Thread Liam Potter
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 ?

[jQuery] Re: callback for append function?

2009-02-02 Thread Stephan Veigl
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?

[jQuery] Re: callback for append function?

2009-02-02 Thread Ricardo Tomasi
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