Whoops! I'm so used to getting email notifications for discussions...I
just figured no one had replied! So sorry for not coming back.

Thank you both for your replies. I was wondering if that might be the
case JQuery Lover.

Would there be a way to generalize the .load for only images with a
certain class? I tried working with the .load before and was
unsuccessful, perhaps you might be able to give me a few pointers. For
example if I give an image a class of "gallery" as well as "loader" I
can set the background image for the "loader" class to a load icon.
And .load would fire when any image with the class of "gallery" loads
(right?).

I guess I could give "gallery' display:none by default? and then when
it loads I can remove that css and also remove the class "loader."

I'm pretty new to all this, so I'm probably way off in my logic! Any
more help would be appreciated....now to try and find the setting
where I get email notifications on reply!

Thanks so much again, and sorry it took me so long to reply!

On Jan 14, 8:48 am, "jQuery Lover" <ilovejqu...@gmail.com> wrote:
> 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 <boton...@gmail.com> 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 <jackins...@gmail.com> 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!

Reply via email to