【发布时间】:2015-05-13 09:14:46
【问题描述】:
我正在测试 tablesorter,我的桌子是:
它包含产品列表,一个产品有2行,一行包含其名称,另一行是用户进行更改的输入字段。
我想做一个表格排序器,将带有空输入字段的产品排序到表格顶部。
这意味着输入字段中没有文本的产品将显示在顶部。
我正在使用 tablesorter jquery。
我的 HTML 表格:Tr1 保存第一个“数据”行,TR2 保存输入字段;
<table class="tablesorter">
<thead>
<tr>
<th class="sorter-inputs empty-top code">Code</th>
<th class="sorter-inputs empty-top designation">Designation</th>
</tr>
</thead>
<tbody>
<tr class='tr1'>
<td>
<div class='code'> </div>
</td>
<td>
<div class='designation'>abc 111</div>
</td>
</tr>
<tr class='tr2'>
<td>
<input type="text" class='CodeInput'/>
</td>
<td>
<input type="text" class='designationInput'/>
</td>
</tr>
...
</tbody> </table>
【问题讨论】:
标签: javascript jquery html tablesorter