How to use pagination on HTML tables?

前端 未结 8 587
长发绾君心
长发绾君心 2020-12-07 21:41

I am trying to use this Pagination library in my HTML table page (specifically light theme) but somehow I am not able to understand how to plugin this library in such a way

8条回答
  •  囚心锁ツ
    2020-12-07 21:44

    It is a very simple and effective utility build in jquery to implement pagination on html table http://tablesorter.com/docs/example-pager.html

    Download the plugin from http://tablesorter.com/addons/pager/jquery.tablesorter.pager.js

    After adding this plugin add following code in head script

    $(document).ready(function() { 
        $("table") 
        .tablesorter({widthFixed: true, widgets: ['zebra']}) 
        .tablesorterPager({container: $("#pager")}); 
    }); 
    

提交回复
热议问题