Using JQuery to Iterate through elements with a timer
<p>I am trying to use JQuery to iterate through a number of &lt;li&gt; objects using a timer, i.e. - for every 5 seconds, I would like to access the next &lt;li&gt; object of my &lt;ul&gt;.</p>

<p>I know you can iterate using the .each function, but I am having trouble with integrating the timer with it to iterate through each one individually.</p>

<p>I tried the following, but it was not working correctly. It kept giving me the last LI element.  I am assuming it is because setTimeout is not sequential.</p>

<pre><code>$("#div_image_thumb ul li").each(function(){    
  var myLIobj = $(this);
  setTimeout(function(){doThis(myLIobj);}, 5000);
});
</code></pre>
