I have a table
inside of a div
with the following style:
#data {
overflow-x:hidden;
overflow-y:visible;
height:500px;
}
This displays a vertical scroll bar once enough data is added to the table. However, when new data is added I would like the div
element to auto-scroll to the bottom.
What JavaScript code could I use to do so? I am open to options in JQuery if necessary but would prefer a JavaScript solution.