开发者

jQuery tablesorter plugin works in IE but not in Firefox or Chrome

I am trying use the jQuery table sorter plugin for a table that is generated using ASP.NET gridview.

For some maddening re开发者_如何学Goason, it works fine in IE but not in Firefox or Chrome. It always seems to sort only on the first column even if you click on other columns.

I have uploaded the generated html (after stripping to the bare minimum while still keeping the ASP.NET ids etc, just in case they could the cause of the problem). Please tale a look at

http://www.reliacap.com/tsorter/tsorter.html

It is self contained except for tablesorter script and style sheet which are in the same folder.

I would appreciate any help.


This makes it work for me:

jQuery(document).ready(function() {
   $('table[id$=GridView1]').tablesorter({
     textExtraction: 'complex'
   });
});

I think the <span> tags inside your table cells confuses the plugin if you don't explicitly tell it to do fancy content extraction.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜