Update . The initial response was aimed at 1.9.x. In dataTables 1.10.x, this is much simpler:
table.on('page.dt', function() {
$('html, body').animate({
scrollTop: $(".dataTables_wrapper").offset().top
}, 'slow');
});
demo → http://jsfiddle.net/wq853akd/
[ ] .dataTables_wrapper .paginate_button. :
function paginateScroll() {
$('html, body').animate({
scrollTop: $(".dataTables_wrapper").offset().top
}, 100);
console.log('pagination button clicked');
$(".paginate_button").unbind('click', paginateScroll);
$(".paginate_button").bind('click', paginateScroll);
}
paginateScroll();
. → http://jsfiddle.net/EjbEJ/