I have a div that updates every 4 seconds and I use the overflow in it, I need the scroll bar always to be aligned on the last line. Any suggestions?
I have a div that updates every 4 seconds and I use the overflow in it, I need the scroll bar always to be aligned on the last line. Any suggestions?
What you need is to give the scroll height of the div, after updating the content. Something like:
var height = el.scrollHeight;
el.scrollTop = height;