I got this code from a website which I have modified to my needs:
Try this out.
function loadlink(){ $('#links').load('test.php',function () { $(this).unwrap(); }); } loadlink(); // This will run on page load setInterval(function(){ loadlink() // this will run after every 5 seconds }, 5000);
Hope this helps.