how to scroll down a div with overflow

I was doing a javascript chat application and I got this css/javascript problem of keeping the last entry in the box visible.
How nice is to find that your favourite jS library already thought of that.


$(document).ready( function (){
// it will scroll down the double of the div's height
// you can change it with any value
$("#scroller").scrollTop( $("#scroller").height() * 2 );


About this entry