具有组合行的 jQuery 表排序器

标签 jquery jquery-plugins datatable tablesorter

抱歉这个标题,我不知道如何更好地描述它。

我有下表:

<tr class="row-vm">
    <td>...</td>
    <td>...</td>
    ...
</tr>
<tr class="row-details">
    <td colspan="8">
        <div class="vmdetail-left">
        ...
        </div>
        <div class="vmdetail-right">
        ...
        </div>
    </td>
</tr>

每隔一行包含第一行的详细数据。默认情况下,它是用 CSS 隐藏的,但我可以用 jQuery 将其滑动打开。

我想实现的目标:类似于此 jQuery 插件的表排序:http://tablesorter.com/docs/

问题:插件应该将所有成对的行“粘合在一起”,并将它们移动在一起。应该只对第一行(.row-vm)的数据进行排序,而忽略第二行(.row-details)的内容。

是否有支持此功能的 jQuery 插件?

最佳答案

found this fiddle另一篇文章中的 jQuery 表排序器对我来说效果很好!

<tr class="row-vm">
    <td>John</td>           
</tr>
<tr class="row-details expand-child">
    <td colspan="6">
        Detail About John
    </td>
</tr>

关于具有组合行的 jQuery 表排序器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2997264/

上一篇:Jquery返回post数据

下一篇:jQuery 范例?

相关文章:

Jquery validate 使用特殊字符验证插件编号

c# - 使用 LINQ 仅返回包含多个 DataTable 的 DataSet 中的两个特定 DataTable

jquery - 如何使用 jquery 清除多选下拉列表

jQuery 多种表单和表单插件

javascript - floatThead 和 bootstrap downdrop

javascript - 在 jQuery 中,this.each() 是如何工作的?

c# - 如何将两个数据表数据连接到一个数据表中以在 asp.net 中的一个 gridview 中显示

javascript - 如何在 jQuery 中使用 onchange 清除数据表?

javascript - 如何使 div 成为设备屏幕高度 css 的 10%

php - 输入按钮/ anchor 链接提交表单,其中指定了 POST 的 GET