Scroll Down
HTML
<div class="box">
s<br>
s<br>
s<br>
s<br>
s<br>
</div>
<button class="btn">
add row
</button>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
CSS
.box {
width: 250px;
height: 150px;
color: white;
background-color: #1d1d1b;
overflow: scroll;
}
JavaScript
$(document).on("DOMSubtreeModified propertychange", ".box", function(e) {
$(this).animate({ scrollTop: $(this).prop("scrollHeight") }, 100);
});
$(document).on('click', '.btn', function(){
$('.box').append('s<br>');
});
for(var i=0; i<30; i++) {
$('.box').append('s<br>');
}