Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的表头包含两个行标题,我无法在包含 colspan 的列之后对列进行排序。我的表结构如jsfiddle中所述。我需要根据标题金额和日期/时间对表结构中的最后一列进行排序。但我不知道为什么它不排序。任何想法或建议都可能会有所帮助。
看看tablesorter的源代码,
jquery.tablesorter.js">http://tablesorter.com/_jquery.tablesorter.js,特别是函数
函数 computeTableHeaderCellIndexes(t) 例如..
它试图将列映射到在你的情况下永远不会起作用的标题——它只是不是为了做你想让它做的事情......
您的结构确实有一个小错误,第二个 tr 缺少 colspan="2"