what’s the best way to add a class to the div with a class of post every 4 seconds using jquery?
<div class="34 post">
<img width="311" height="417" src="#" class="#" alt="newspapers" />
<h2><a href="#">Headline News Part 2</a></h2>
<p>testing new content</p>
</div>
<div class="9 post">
<img width="311" height="417" src="#" class="#" alt="newspapers" />
<h2><a href="#">Headline News Part 2</a></h2>
<p>testing new content</p>
</div>
<div class="6 post">
<img width="311" height="417" src="#" class="#" alt="newspapers" />
<h2><a href="#">Headline News Part 2</a></h2>
<p>testing new content</p>
</div>
so i want the first to have a class of “display” then after 4 seconds, i want to remove the class on that one and add it to the second one. and then after 4 more seconds, remove it from the second and add it to the third. when it gets to the end it loops back around.
Wrap it in a jQuery document.ready function 🙂