jquery refresh div after ajax code example

Example 1: ajax data not reflecting after refresh particular div jquery

$(document).ready(function() {
$.ajaxSetup({ cache: false });
setInterval(function() {
$('#loaddiv').load('teste.asp');
}, 1000);
});

Example 2: refresh ajax jquery

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);

Example 3: jquery ajax refresh

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);