I'm trying to make update div block after jQuery ajax succesfull request, this is works but all blocks dublicates (picture1), in picture 2 is shown how it looks after refreshing page with browser.
To update block I'm using function:
function async_get(addr,func) {
$.ajax({
url: addr,
async: false,
success: func
});
}
and it's called like this:
async_get(
'http://localhost/getfreelance/welcome',
function (data) {
$('#header').html(data);
}
);
Any solutions? :)
You didn't understand, i need to update/refresh div block when ajax request is success, instead of your function fffsuccess() i'm using: 'function async_get(addr,func) { $.ajax({ url: addr, async: false, success: func }); }' and my #header div updates but it dublicates data.