sScrollY and Paginate: scroll to top after page change

sScrollY and Paginate: scroll to top after page change

beginner_beginner_ Posts: 55Questions: 2Answers: 0
edited May 2011 in General
Hi all,

have another short question. If I use sScollY and Pagination, how can I make the scroll slider jump to the top after changing a page?

Replies

  • beginner_beginner_ Posts: 55Questions: 2Answers: 0
    [code]
    $(document).ready(function() {
    var oldStart = 0;
    $('#result').dataTable( {
    //here is our table defintion
    "fnDrawCallback": function (o) {
    if ( o._iDisplayStart != oldStart ) {
    $(".dataTables_scrollBody").scrollTop(0);
    oldStart = o._iDisplayStart;
    }
    }
    [/code]
This discussion has been closed.