Say I have 2 divs, how I can I refresh them both every 5 seconds with 1 ajax request?
<div id='1'></div>
<div id='2'></div>
I can refresh 1 like this:
interval = setTimeout(refreshpage, 5000);
function refreshpage() {
$('#1').load('page.php?&timer='+new Date().getTime()+' #1');
interval = setTimeout(refreshpage, 5000);
}