Why prependTo() inside load() completion callback not trigger when using setTimeout()? It just only repeat load() result.php but not execute $('#loadmore').prependTo('#boxchat');. Basically, i used this following code:
function requestmessage() {
$('#boxchat').load('result.php', function(){
$('#loadmore').prependTo('#boxchat');
});
setTimeout(requestmessage, 1000);
};
requestmessage();
I want to make real time result.php update by using setTimeout() and prependTo() div(#loadmore) inside div(#boxchat) at the same time. Anyone does have solution?