Ok, so is there a way with javascript to fire a function when a div is
finished loading it's contents?

On Thu, Oct 1, 2009 at 8:38 PM, MorningZ <morni...@gmail.com> wrote:

>
> James:  there is also a JavaScript event called "load" for certain DOM
> objects.. and consequently the ability to wire jQuery onto that
> (http://docs.jquery.com/Events/load#fn)
>
>
> to original poster:
>
> "if I target the IMG, then it works fine, but how come it doesn't work
> with the div? "
>
> because <div>'s don't fire a "load" event, and as you found out,
> images do
>
>
> On Oct 1, 5:31 pm, James <james.gp....@gmail.com> wrote:
> > load() is suppose to take a url as the first parameter.
> http://docs.jquery.com/Ajax/load
> >
> > On Oct 1, 8:47 am, flyagaricus <flyagari...@gmail.com> wrote:
> >
> > > I'm new to JQuery
> >
> > > I can't get load() to work with a div class:
> >
> > > <script type='text/javascript'>
> > >         jQuery(document).ready(function($) {
> > >                 $(".Loader").load(function(){
> > >                         alert("bang");
> > >                 });
> > >         });
> > > </script>
> > > <div class="Loader">
> > >       <img src="http://home.arcor.de/poesenau/Witness-Tree.JPG";
> > > width="1200" height="1600" />
> > > </div>
> >
> > > if I target the IMG, then it works fine, but how come it doesn't work
> > > with the div?
>

Reply via email to