add auto scroll to bottom of div html code example
Example 1: js scroll to bottom of element
var objDiv = document.getElementById("your_div");
objDiv.scrollTop = objDiv.scrollHeight;
Example 2: scroll to bottom of div javascript
function scrollSmoothToBottom (id) {
var div = document.getElementById(id);
$('#' + id).animate({
scrollTop: div.scrollHeight - div.clientHeight
}, 500);
}
function scrollToBottom (id) {
var div = document.getElementById(id);
div.scrollTop = div.scrollHeight - div.clientHeight;
}