animate each child jquery

Posted by Martavis P. on Stack Overflow See other posts from Stack Overflow or by Martavis P.
Published on 2013-10-25T19:15:14Z Indexed on 2013/10/25 21:54 UTC
Read the original article Hit count: 74

Filed under:
|
|

It's amazing how simple this should be but I can't get it to work. I'm looking to animate a set of divs one at a time. I am using animate.css for those familiar with it. I thought I may have found the answer here but jsFiddle is not working at the moment. Anywho, the code is

$('.elements').each(function(i) { $(this).addClass('animated slideInLeft').delay(500); });

The problem is that when I debug and step through each element, the animation is happening for each element but when I let it run, it appears to all do it at once. What is needed to actually show the animation one at a time?

Thanks

EDIT:

jsFiddle is back up and that link provided below did not help. The answer did not include looping through elements, but looping the animation itself.

EDIT 2

Here is a Fiddle to play with if you guys need one.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about css