How to auto-move to the bottom of a block

var scrolled = false;
function updateScroll(){
    if(!scrolled){
        var element = document.getElementById("chatbox");
        element.scrollTop = element.scrollHeight;
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *