I'm dynamically adding rows to a table using jQuery.
The table
is inside a div
which has overflow:auto
thus causing a vertical scrollbar.
I now want to autoscroll my container div
to the last row. What's the jQuery version of tr.scrollintoView()
?
var rowpos = $('#table tr:last').position();
$('#container').scrollTop(rowpos.top);
should do the trick!