Jquery 分页不显示总页数

Jquery 分页不显示总页数,jquery,tablesorter,Jquery,Tablesorter,我使用jquery插件对表进行排序和分页(tablesorter.pager.js) 我有这么多的列表页,它工作得很好。 在一个页面中,我根据过滤器动态加载页面(基本上是单击页面加载表的按钮部分) 加载时,即使有多个页面,表分页也会显示总页面(1/1)。 但在对任何列进行排序时,它会像(1/8)一样正确地显示页数,即仅在加载时,它不会正确地显示页数 所有其他功能都可以正常工作 jquery $(document).ready(function(){ if(0 < $("#

我使用jquery插件对表进行排序和分页(tablesorter.pager.js)

我有这么多的列表页,它工作得很好。 在一个页面中,我根据过滤器动态加载页面(基本上是单击页面加载表的按钮部分)

加载时,即使有多个页面,表分页也会显示总页面(1/1)。 但在对任何列进行排序时,它会像(1/8)一样正确地显示页数,即仅在加载时,它不会正确地显示页数

所有其他功能都可以正常工作

jquery

  $(document).ready(function(){
  if(0 < $("#listTable tbody tr").length){ 
      $("table") 
        .tablesorter({sortList: [[0,0]],widthFixed: true }) 
        .tablesorterPager({container: $("#pager")});
    } 
$(文档).ready(函数(){
如果(0<$(“#列表表tbody tr”).length){
$(“表格”)
.tablesorter({sortList:[[0,0]],widthFixed:true})
.tablesorterPager({container:$(“#pager”)});
} 
}))

我尝试过设置默认排序,但不起作用。
解决方案是什么?

改变了一些事情,如

$(document).ready(function(){
   if(0 < $("#listTable tbody tr").length){ 
      $("#listTable") 
      .tablesorter({sortList: [[0,0]],widthFixed: true }) 
     .tablesorterPager({container: $("#pager")});
}
$(文档).ready(函数(){
如果(0<$(“#列表表tbody tr”).length){
$(“#列表表”)
.tablesorter({sortList:[[0,0]],widthFixed:true})
.tablesorterPager({container:$(“#pager”)});
}
它的工作