There is a div with overflow: scroll . How can I animate scrolling content down with JavaScript or jQuery?

    1 answer 1

    JavaScript, easy scrolling:

     element.scrollTop = element.scrollHeight 

    For jQuery - ScrollTop . Namely

     var div = $("#mydiv"); div.scrollTop(div.prop('scrollHeight')); 

    The idea is the same as in pure javascript'e - we set the maximum possible (or rather logically justified, since you can put just 10,000) the scroll value.

    There are beautiful demos here.