jquery - How to let scrollbar keep up with growing height when scroll:auto? -


i have <div> has property scroll:auto. when text added <div> , height exceeds default height, have scroll down see latest lines of text added. want latest line of text visible. if that, use scroll:none instead of auto. how can achieve that? hope understand mean.

update: bilgehankorkmaz's solution works, not after while. if enter lot of text scrolling doesn't work anymore.

edit: set scroll height value .scrolltop():

$("div").scrolltop($("div").get(0).scrollheight); 

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

c++ - Accessing inactive union member and undefined behavior? -

php - Get uncommon values from two or more arrays -