how set position element to end of scroll page 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
// if using jQuery
function scrollSmoothToBottom (id) {
var div = document.getElementById(id);
$('#' + id).animate({
scrollTop: div.scrollHeight - div.clientHeight
}, 500);
}
//pure JS
function scrollToBottom (id) {
var div = document.getElementById(id);
div.scrollTop = div.scrollHeight - div.clientHeight;
}