Scroller example State saving

Scroller will automatically integrate with DataTables in order to save the scrolling position of the table, if state saving is enabled in the DataTable (stateSaveDT). This example shows that in practice - to demonstrate, scroll the table and then reload the page.

The Javascript shown below is used to initialise the table shown in this example:

1
2
3
4
5
6
7
8
9
10
$(document).ready(function() {
    $('#example').DataTable( {
        ajax:           "data/2500.txt",
        deferRender:    true,
        dom:            "frtiS",
        scrollY:        200,
        scrollCollapse: true,
        stateSave:      true
    } );
} );

In addition to the above code, the following Javascript library files are loaded for use in this example: