I'm working on a project with a table
nested inside a div
, and it has some unique styling:
#data {
overflow-x:hidden;
overflow-y:visible;
height:500px;
}
Currently, as the table fills up with data, a vertical scroll bar appears. But I want the div
to automatically scroll to the bottom whenever new data is added.
Can anyone help me out with some JavaScript code that can achieve this? I'm open to JQuery suggestions, but I'd prefer a solution using pure JavaScript.