jQuery中的HTML表排序 [英] HTML Table Sorting in jQuery
本文介绍了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
这篇关于jQuery中的HTML表排序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文