Php tablesorter无法读取属性';0';未定义的数据类型

Php tablesorter无法读取属性';0';未定义的数据类型,php,jquery,tablesorter,Php,Jquery,Tablesorter,嗨,我有一个动态填充的表(通过php和jquery),但是表排序器不工作 在页面末尾初始化脚本 <!-- JavaScript --> <script src="js/bootstrap.js"></script> <!-- Page Specific Plugins --> <script src="js/tablesorter/jquery.tablesorter.js"></script> <scrip

嗨,我有一个动态填充的表(通过php和jquery),但是表排序器不工作 在页面末尾初始化脚本

<!-- JavaScript -->    
<script src="js/bootstrap.js"></script>

<!-- Page Specific Plugins -->
<script src="js/tablesorter/jquery.tablesorter.js"></script>
<script src="js/tablesorter/tables.js"></script>
<script>
function dynamicRefresh()
{       
    //generic
    $(".pm-count").load("php-scripts/dynamic/pm-system/countU.php"); 
    $(".pm-ddmenu").load("php-scripts/dynamic/pm-system/menu.php");
    $(".com-count").load("php-scripts/dynamic/com-system/countU.php");
    $(".com-ddmenu").load("php-scripts/dynamic/com-system/menu.php");
    //Page Specific
    var lpage = page - 1;       
    $("#new_msg").load("php-scripts/data/setlist/table.php", {'page':lpage});       
    //Refresh Rate
    setTimeout("dynamicRefresh()",60000);
}   
window.onload=dynamicRefresh;
</script>
我认为可以安全地假设,当插件初始化时,它会构建标题,但也会将数据加载到更快的排序中,如果这是正确的,是否有一个“更新”初始化过程的函数

更新2

在读了更多的内容后,我发现我只需要添加一个触发器 在这种情况下

$('.tablesorter').trigger('update');

它现在运行良好

您还可以将代码包装在
$(document.ready(function(){})中
以确保页面在运行前已加载
Built headers:,1ms jquery.tablesorter.js:147
[th.header, th.header, th.header, th.header, th.header, prevObject: x.fn.x.init[1], context: table.table.table-hover.table-striped.tablesorter, selector: "thead th", jquery: "1.10.2", constructor: function…]
$('.tablesorter').trigger('update');