how do I show n json items every x seconds using jquery?
<p>I have a json object 'items' which has few items that I want to show 2 of them every 2 seconds. How would I do that? so, it displays items in division1 every few seconds instead of showing all at once. Eg. get all items every 5 seconds and show 4 items every second for 20 items.</p>

<pre><code>&lt;table id="division1" &gt;
    &lt;thead&gt;
     &lt;th&gt;Name&lt;/th&gt;
     &lt;th&gt;Score&lt;/th&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;&lt;/tbody&gt;
&lt;/table&gt;



function render_items(division){
    var tablebody ="";
     $.each(division.items, function (i,item){
      var tablerow ="&lt;tr&gt;"
       +"&lt;td&gt;"+item.name+"&lt;/td&gt;"
       +"&lt;td&gt;"+item.score+"&lt;/td&gt;"
       +"&lt;/tr&gt;";
      tablebody = tablebody+tablerow;

        //$('#test').append(division.name+' '+i+' '+robot.name+'&lt;br&gt;');
     }
     );
     $('#'+division.name+" tbody").html(tablebody); 
}

function poll(){
    $.post("data.php", {getvalues: 0}, 
    function (data, status){
     $.each (data.divisions, function(i,division){
      render_items(division);  

     }); 
    },
    'json'
    );
    setTimeout('poll()',5000);
}

$(document).ready(function() {
    poll();

}
</code></pre>
