How to periodically update a date/time value on a page using jQuery?
<p>In this example, I have an input text field that contains a datetime value set with jQuery.</p>

<p><strong><a href="http://jsfiddle.net/D4Hu9/" rel="nofollow">http://jsfiddle.net/D4Hu9/</a></strong></p>

<p>HTML:</p>

<pre><code>&lt;input id="foo" name="foo" type="text" value="" size="55" /&gt;
</code></pre>

<p>JS:</p>

<pre><code>jQuery(document).ready(function()
{
    var now = new Date();
     jQuery('#foo').val(now.toString());        
});
</code></pre>

<p>How can I update this value every 5 seconds from jQuery?</p>
