简体   繁体   中英

animating elements sequentially using animate css

I have the following http://jsfiddle.net/fFMt2/1/ , in which I have a set of 20 boxes. I use the animate css plugin from http://daneden.me/animate .

What I would like to do is to animate each of the boxes in a sequential manner, I mean animate them one after the other.

Am not sure what am I missing to make them animate sequentially.

I seem to be doing something wrong with the setTimeout function

setTimeout(function(){
        $('.slider').append('<li><div class="box animated bounceInRight"></div></li>');
        },100);

Appreciate if someone could help me fix this

You have to increment the delay on each item.

 setTimeout(function(){
    ...
 },100 * idx);
        --^--

Demo: http://jsfiddle.net/fFMt2/2/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM