Javascript Ticker Problem
<p>I found a bit of Javascript to create a news ticker—essentially just rotating through the items of a list. </p>

<pre><code>&lt;script&gt;
var ticker = $('ul.ticker');
ticker.children(':first').show().siblings().hide();
setInterval(function() {
    ticker.find(':visible').fadeOut(function() {
        $(this).appendTo(ticker);
        ticker.children(':first').show();
    });
},5000);
&lt;/script&gt;
</code></pre>

<p>It worked really well when I just had list items, but when I made the list items into links it started acting strangely. I watched it with firebug and it appears that it goes through the list just fine the first time, then starts creating new list items:</p>

<pre><code>&lt;li style="display: none;"&gt;&lt;/li&gt;
</code></pre>

<p>It seems to alternate displaying one of these <code>&lt;li&gt;</code> then after it goes through the list the first time.</p>

<p>Thank you for your help!</p>

<p>edit 1: HTML</p>

<pre><code>&lt;ul class="ticker"&gt;
&lt;li&gt;&lt;a href="#"&gt;News Item&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="#"&gt;News Item 2&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
