Unfortunately it will not. jQuery will know that it is getting some data and that is all. It does not know that it's html, xml or plain text. Image loading is done by browser when you insert the markup into the DOM. So the workaround would be to load your content then add it to the DOM, bind count how many images you have and then add a .load() event to every image that calls some function which checks if it's the last image that loaded and then only remove the animation and show the content.
Damn, it was a long sentence :) ---- Read jQuery HowTo Resource - http://jquery-howto.blogspot.com On Wed, Jan 14, 2009 at 6:40 PM, Beres Botond <[email protected]> wrote: > > Maybe you'll have more luck with this. > > // display loading animation here > > $("#ajax_content").load('/sourcefiles/example.html', {}, function() { > // hide loading animation here > > }); > > However I'm still not sure if it will actually wait till images are > downloaded. > > On Jan 14, 7:14 am, jinscoe <[email protected]> wrote: >> Hello - I'm sorry if this posts twice....its been about 30 minutes or >> so since I last attempted and I still haven't seen my discussion pop >> up. >> >> I would guess this is a fairly easy task and I'm just missing the >> boat, because you see loading images everywhere with ajax loading. >> >> Here is my situation. I have a webpage that is set up a lot like a >> basic slide show - forward and back controls at the bottom a header at >> the top and an ajax loading window in the middle. I am using this >> function to make the ajax call: >> >> $.get('/sourcefiles/example.html', function(innerHtml){ >> $('#ajax_content').html(innerHtml); >> }); >> >> So right now I'm just getting the html and popping it into my >> ajax_content div. I would like to make it so that it waits until the >> entire content of the html (images and all) loads before displaying >> anything. Currently it seems to wait for the just the html (text) to >> load and then continues to load the images on screen. >> >> I would like to just make a class called ".loading" or something, put >> a loading background image on it and strip that off once everything is >> loaded. >> >> Hopefully I have been clear enough. Let me know if anything needs more >> explaining and thanks in advance for any help!

