Javascript jQuery tablesorter:TypeError:s[1]未定义
我有一个表,在用JS更新它之后,我运行了update trigger(就像在这种情况下经常说的那样),但它不工作,FireBug说:“TypeError:s[1]未定义” HTML代码:Javascript jQuery tablesorter:TypeError:s[1]未定义,javascript,jquery,tablesorter,Javascript,Jquery,Tablesorter,我有一个表,在用JS更新它之后,我运行了update trigger(就像在这种情况下经常说的那样),但它不工作,FireBug说:“TypeError:s[1]未定义” HTML代码: <table id="stattable"> <thead> <tr><th>Producer</th><th>Value</th><th>Amount</th></tr> </
<table id="stattable">
<thead>
<tr><th>Producer</th><th>Value</th><th>Amount</th></tr>
</thead>
<tbody>
<!-- here dynamically generated data -->
</tbody>
<tfoot>
<tr><td>SUM:</td><td></td><td></td></tr>
</tfoot>
</table>
生产者价值量
总数:
动态数据的格式为:
<tr>
<td>Ford</td>
<td>1999.90</td>
<td>10</td>
</tr>
<tr>
<td>Renault</td>
<td>345.1</td>
<td>2</td>
</tr>
<tr>
<td>Mitsubishi</td>
<td>0</td>
<td>0</td>
</tr>
... etc.
河流浅水处
1999.90
10
雷诺
345.1
2.
三菱
0
0
... 等
有什么好主意吗?当你开始一个活动时,你需要把额外的参数用方括号括起来:
$('selector').trigger('event', [ parameters ]);
$('#stattable').trigger('sorton', [ [[1, 1], [0, 0]] ]);
因此,在本例中,sortList缺少一组额外的括号:
$('selector').trigger('event', [ parameters ]);
$('#stattable').trigger('sorton', [ [[1, 1], [0, 0]] ]);
我们能看到相关的HTML吗?或者更好的是JSFIDLE?JSFIDLE会很难。。。因为这是一个商业项目…有虚拟数据。没有它,我们无法为您“调试”它。“sorton”做什么?您确定阵列传输正确吗?