First we will make a customize function called getRefresh() -
function getRefresh(){
$(”#auto”).load(”data.php”, ”, callback);
}
Here we have used load( url, [data], [callback] ) ajax api. This api load HTML output from a remote file (data.php) and inject it into the div (auto). Below we have created a callback function named callback() -
function callback(){
setTimeout(”getRefresh()”, 1000);
}
setTimeout() function is [...]
