带有tablesorter的嵌套表 [英] Nested tables with tablesorter

查看:80
本文介绍了带有tablesorter的嵌套表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在表中应用了tablesorter的嵌套表。

I have nested tables within a table that has the tablesorter applied to it.

它向嵌套表添加排序标题,但它们不对行进行排序并抛出了一个Javascript错误。

It adds sort headers to the nested tables, but they don't sort the rows and a Javascript error is thrown.

我想要:


  • 嵌套表不可排序

  • 巢表上的排序实际上有效。

但不是现状。

推荐答案

您的第一个选项要容易得多(使嵌套表无法排序):

Your first option is much easier (making the nested tables not sortable):

构建表格如下:

$('。tablesorter')。tablesorter({selectorHeaders:'> thead> tr> th'});

然后您可能还需要为所有css添加前缀,例如:

And then you might also need to prefix all your css with something like:

table.tablesorter> thead> tr> ...

这篇关于带有tablesorter的嵌套表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆