jQuery中的HTML表排序
问题描述:
我有一个简单的HTML表,我需要在jQuery中的每一列上添加排序和分组.
I have simple HTML Table, I need to add sorting and grouping on every columns in jQuery.
<table cellspacing='0'>
<thead>
<tr>
<th>Task Details</th>
<th>Progress</th>
<th>Vital Task</th>
</tr>
</thead>
<tbody>
<tr>
<td>Create pretty table design</td>
<td>100%</td>
<td>Yes</td>
</tr>
</tbody>
答
有许多插件可使用jQuery执行此操作.最有名的是jQuery tablesorter:
There are various plugins to perform this using jQuery. The most known one is jQuery tablesorter:
这里有很多这样的插件,请选择最喜欢的插件:
There are loads of such plugins here, pick the one you like most:
http://www.tripwiremagazine.com/2013/06/jquery-filter-sort-plugins.html