I want to refresh the content of a div periodically (eg: every 5s)
HTML
<div id="my_refreshing_div"></div>
JS
function auto_load(){
$.ajax({
url: "myfile.php",
cache: false,
success: function(response){
$("#my_refreshing_div").html(response);
}
});
}
$(document).ready(function(){
//Call autoload when page is ready
auto_load();
});
//Call auto_load() at 5s intervals
setInterval(auto_load,5000);