我想能够通过ajax(表格内容生成的xml)..for每1秒生成一个显示自动更新状态的表格。
我无法使jQuery tablesorter正常工作。
每次发生更新时(每隔1秒),我都会调用它。它似乎正在运行,并且firefox控制台中没有错误。该表已正确呈现(并正在更新)
//imports in head tag
<script type="text/javascript" src="./support/jquery-1.6.4.js"></script>
<script type="text/javascript" src="./support/jquery.tablesorter/jquery.tablesorter.js"></script>
updateTable(newXML); //here the table is generated and set to innerhtml of a div tag.
$("table").tablesorter({sortList:[[0,1],[1,1]]});从本质上讲,我希望我的前两列按降序排序,但它们不是。
这是我的table标记,在此之后,我在html中看不到任何错误。
"<table id='mytable' width=650 class=\"tablesorter\"><tr id='headRow'>" + 发布于 2011-10-20 13:41:27
根据http://tablesorter.com/docs/的说法:
HTML是一个jQuery插件,用于将带有THEAD和TBODY标签的标准
表格转换为可排序的表格,而无需刷新页面。
我觉得你需要<thead>和<tbody>
https://stackoverflow.com/questions/7831593
复制相似问题