You need to set the interval timer and then call the function directly. Try the following:
function autoRefresh_div() {
$("#div").load("load.html");
}
setInterval(autoRefresh_div, 5000);
autoRefresh_div();
, setTimeout(), . , , , , . :
function autoRefresh_div() {
$("#div").load("load.html", function() {
setTimeout(autoRefresh_div, 5000);
});
}
autoRefresh_div();