tablesorter jquery插件在FF 3.6.12中失败,msg为“table.config.parsers [c]未定义” [英] Tablesorter jquery plugin fails in FF 3.6.12 with msg "table.config.parsers[c] is undefined"
问题描述
上使用最新版本的插件,截至2011年5月4日,Chrome,Safari和IE都完好无损。
我也试过用FireBug禁用无效。
这里是我测试的HTML:
<!DOCTYPE html>
< head>
< script src =/ javascripts / jquery / jquery-1.4.4.min.js?1301000558type =text / javascript>< / script>
< script src =/ javascripts / jquery.tablesorter.js?1304537000type =text / javascript>< / script>
< script>
$(document).ready(function(){
$(#testtable)。tablesorter({debug:true});
});
< / script>
< / head>
< body>
< table id ='testtable'>
< thead>
Col1< / th>
Col2< / th>
< th> Col3< / th>
< / thead>
< tbody>
< tr>
< td> val1< / td>
< td> val2< / td>
< td> val3< / td>
< / tr>
< tr>
< td> val2< / td>
< td> val1< / td>
< td> val3< / td>
< / tr>
< tr>
< td> val3< / td>
< td> val1< / td>
< td> val2< / td>
< / tr>
< / tbody>
< / table>
< / body>
< / html>
使用firebug时,点击一个列标题:
内置标题:,0ms
[th.header,th.header,th
检查行是否为空:
检查行是否为空:
检查行是否为空:0
列:0解析器:文本列:1解析器:文本列:2解析器:文本
构建3行缓存:,0ms
下面是点击后的错误:
table.config.parsers [c]未定义
它在未缩减的源代码行600的setTimeout函数中。
> COLSPAN
在所有空行中。当我删除
< td colspan =3>
并做了三个空的< TD>
th问题没有了。 With the latest version of the plugin as of 5/4/2011 on OSX 10.6.7 w FF 3.6.12 Chrome, Safari, and IE all work perfectly fine. I also tried it with FireBug disabled to no avail.
Here's the HTML I'm testing with:
<!DOCTYPE html>
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<script src="/javascripts/jquery/jquery-1.4.4.min.js?1301000558" type="text/javascript"></script>
<script src="/javascripts/jquery.tablesorter.js?1304537000" type="text/javascript"></script>
<script>
$(document).ready(function () {
$("#testtable").tablesorter( {debug:true} );
});
</script>
</head>
<body>
<table id='testtable'>
<thead>
<th>Col1</th>
<th>Col2</th>
<th>Col3</th>
</thead>
<tbody>
<tr>
<td>val1</td>
<td>val2</td>
<td>val3</td>
</tr>
<tr>
<td>val2</td>
<td>val1</td>
<td>val3</td>
</tr>
<tr>
<td>val3</td>
<td>val1</td>
<td>val2</td>
</tr>
</tbody>
</table>
</body>
</html>
With firebug on, here are the messages before trying to click on a column header:
Built headers:,0ms
[th.header, th.header, th.header]
Checking if value was empty on row:0
Checking if value was empty on row:0
Checking if value was empty on row:0
column:0 parser:text column:1 parser:text column:2 parser:text
Building cache for 3 rows:,0ms
Here's the errors after clicking:
table.config.parsers[c] is undefined
which is in the setTimeout function around line 600 in the un-minified source.
I also had the same issue, the problem was I was using empty <TR>
which had COLSPAN
in all the empty rows.
When I removed the <td colspan="3">
and did three empty <TD>
the problem was gone.
这篇关于tablesorter jquery插件在FF 3.6.12中失败,msg为“table.config.parsers [c]未定义”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!