TableSorter Issues Initial Number of Visible Rows

Yesterday I discovered TableSorter , so it’s obvious that I don’t understand much, but using a few demos and reading documents, I could set up working sorting in the table until I found Pager Widget .

It’s not that it doesn’t work, it just doesn’t work, as I would expect it to work. Most of my implementation is based on this demo provided by the author.

I simply removed the widthFixed parameter and the zebra widget (because I did not see it in action) and defined two of my four columns so as not to sort. I also slightly changed the output text of the pager widget:

$( document ).ready( function() {

    $( 'table' ).tablesorter({

        theme: 'bootstrap',
        headerTemplate: '{content}{icon}',
        widgets: [ "uitheme" ],
        headers: {
            3:{sorter: false},
            4:{sorter: false}
        }
    }).tablesorterPager({

        container: $(".ts-pager"),
        saveSort : false,
        output: '{startRow} to {endRow} ({totalRows})'
    });

});

script HTML, </body>, . jQuery, , ( ), , , , :

<script src="/public/assets/projectfolder/js/jquery.tablesorter.min.js"></script>
<script src="/public/assets/projectfolder/js/jquery.tablesorter.widgets.min.js"></script>
<script src="/public/assets/projectfolder/js/jquery.tablesorter.pager.min.js"></script>

, , , , , .

, , saveSort false tableSortPager. , , , , , .

, Pager, . , . .

, , , , , .

. ( GUI, ), .

, , , , saveSort, false, .

?

+4
1

pager savePages.

$(function(){
    $( 'table' ).tablesorter({
        theme: 'bootstrap',
        headerTemplate: '{content}{icon}',
        widgets: [ "uitheme" ],
        headers: {
            3:{sorter: false},
            4:{sorter: false}
        }
    })
    .tablesorterPager({
        container: $(".ts-pager"),
        savePages : false,
        output: '{startRow} to {endRow} ({totalRows})'
    });
});

saveSort saveSort, widgetOptions:

$(function(){
  $("table").tablesorter({
    widgets: ["saveSort"],
    widgetOptions : {
      // if false, the sort will not be saved for next page reload
      saveSort : false
    }
  });
});
+3

All Articles