I’m trying to write some jquery that will go through a specified unordered list / dom element and assign a CSS (animation) class to each list item / child. I also want to make an adjustable delay time between the .addClass.
Everything I’ve tried has failed miserably.
For example:
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
Becomes:
<ul>
<li class="animation">Item 1</li>
(50ms delay)
<li class="animation">Item 2</li>
(50ms delay)
<li class="animation">Item 3</li>
(50ms delay)
<li class="animation">Item 4</li>
(50ms delay)
</ul>
Any thoughts?
This here works:
http://jsfiddle.net/GCHSW/1/