I am trying to show and hide list items (which I cannot advise to a separate class) in a sequence, i.e. delay.
this is my html ...
<ul id="aclass"> <?php for ($i = 0; $i < count($enties); ++$i) : <li class="animation"> <div id="frame"> </div> </li> <?php endfor; ?> </ul>
still i
$(document).ready(function() { function showpanel() { $("ul#aclass > li").each(function() { $(this).css("display", "none"); }); setTimeout(showpanel, 200) });
I want to see the first li element for two seconds, then replace, and the second for two seconds, then the next, etc. I do not know how to select the "next" li element and run the function for each element sequentially.
Thanks for the help.
javascript jquery html css
tgifred
source share