Search code examples
phpjavascriptjqueryajaxlive

How can I have it so images don't flicker when ajax is called?


On this page: http://friendsconnect.org/chat/ you can see a very simple chat. How can I have it so the image doesn't flicker each time ajax is called?

Javascript:

function execute_check(){
    $.ajax({
        type:'GET',
        url: 'chat.php',
        success: function(data){
            $("#container").html(data);
        }
    });
    setTimeout(execute_check, 2000);
}

Solution

  • dont send the image and update only content.