Try putting some logging in the .load callback, on the ct
variable...make sure it's getting bound correctly.

On Dec 4, 2:19 pm, Polskaya <[EMAIL PROTECTED]> wrote:
> Hi all,
> I am trying to load content from another file in several divs on one
> page.
> If i use this script:
>
> var ct=0;
> $(".container").each(function () {
> var id=this.id;
>  $("[id="+id+"]").append("<div id=pic"+ct+"><img src='../grafix/
> spinner.gif'>d</div>");//alert('r');
>         $("#pic"+ct).hide()
>         .load("ajax_getimage.php?url="+id);
>         $("#pic"+ct).fadeIn("slow");
>         ct++;
>
> });
>
> everything works wel.
> Now i'd like the script to hold until the complete remote content has
> been loaded (an image) and then fade it in.
> Therefore I use this script:
>
> var ct=0;
> $(".container").each(function () {
> var id=this.id;
>  $("[id="+id+"]").append("<div id=pic"+ct+"><img src='../grafix/
> spinner.gif'>d</div>");
>         $("#pic"+ct).hide()
>         .load("ajax_getimage.php?url="+id,function(){
>         $("#pic"+ct).fadeIn("slow");
>         });
>         ct++;
>
> });
>
> The div which holds the content has to hide until fully loaded, and
> the fade in. It hides already, but doesn't show up again.
>
> obviously I am overlooking soemthing here. Anyone who can shed some
> light?
> Thanks!

Reply via email to