In my website I have a group/list of divs that will each contain an image. What I want to do is have a class added to each div one-by-one, in sequence. Once it has added the class to each div, then then it completes. So I don't want it to loop.
Here's the general HTML setup:
<div class="row">
<div class="image"></div>
<div class="image"></div>
<div class="image"></div>
</div>
So by the time the javascript has run its course, the html will look like this:
<div class="row">
<div class="image active"></div>
<div class="image active"></div>
<div class="image active"></div>
</div>
I am currently using jQuery on the site, so a method to do that with jQuery would be preferred.
Thanks!
// EDIT
Let me add some more info so that what I'm trying to accomplish makes more sense. I know how to add a class, but, I don't want to add the .active class to each .image div all at once, it needs to happen one at a time so that there is almost a slight delay in between each one.
If anyone needs more clarification, I might post up an animated .gif or something to better describe what I want, but hopefully that helps!
Thanks again!