Nevermind, I just did it with a recursive function:

function fadeListItem($i) {
        $('.masonryWrap li:eq('+$i+')').fadeIn(1000, function(){
                $i++;
                if( $i > $('.masonryWrap li').length ){
                } else {
                        fadeListItem($i);
                }
        });
}

fadeListItem(0);

On Nov 21, 5:53 pm, Heath <dhbeck...@gmail.com> wrote:
> Basically what I am trying to do here is fade in all of the list items
> of a given unordered list one at a time. Here's what I have so far,
> but once I add the setTimeout (so that everything doesn't fade in
> instantly) it goes completely fubar. Any suggestions on how I should
> 'wait' until the item is faded in to fade the next one? Thanks.
>
> $('.masonryWrap li').hide();
> var $i = 0;
> while ( $i < $('.masonryWrap li').length ) {
>         setTimeout(function() {
>                 $('.masonryWrap li:eq('+$i+')').fadeIn('slow');
>         },
>         5000);
>         $i++;
>
> }

Reply via email to