jQuery can't get animate function to cycle/loop using setTimeout? Tweet Ticker
<p>I'm creating a horizontal ticker to scroll latest tweet. Feeding in tweets via <a href="http://tweet.seaofclouds.com/" rel="nofollow">Sea of clouds jQuery plugin</a>.</p>

<p>I have created an animation function which I'm trying to loop using a <code>setTimeout(doTicker, 6000);</code></p>

<p>Can anyone help me see what I'm doing wrong? Help much appreciated thanks.</p>

<p><br /></p>

<p>See code below...</p>

<p>Have also created fiddle. <a href="http://jsfiddle.net/motocomdigital/h4x8D/1/" rel="nofollow">http://jsfiddle.net/motocomdigital/h4x8D/1/</a></p>

<p><img src="http://i.stack.imgur.com/17KQ2.png" alt="enter image description here"></p>

<p>Can't get the doTicker to loop/cycle</p>

<pre><code>$(".tweetbar-ticker").tweet({

    username: "twitter",
    join_text: "auto",
    count: 1,
    auto_join_text_default: "we said,",
    auto_join_text_ed: "we",
    auto_join_text_ing: "we were",
    auto_join_text_reply: "we replied to",
    auto_join_text_url: "we were checking out",
    loading_text: "loading tweets..."

}).bind("loaded", function() {

    $('.tweetbar-ticker ul li').clone().appendTo('.tweetbar-ticker ul');

    var $tweetBar = $('.tweetbar-ticker'),
        tweetLength = $('.tweetbar-ticker ul li').outerWidth(),
        $tweetAnchor = $('.tweetbar-ticker ul li a');

    $tweetBar.css({
        'width': tweetLength * 2 + 'px'
    });

    $tweetAnchor.attr({
        target: "_blank"
    });

    function doTicker() {

        $tweetBar.animate({
            'left': '-' + tweetLength + 'px'
        }, 20000, 'linear');

        setTimeout(doTicker, 6000);
    }

    doTicker();

});​
</code></pre>

<p>Thanks
Josh</p>
