【发布时间】:2011-09-01 20:31:39
【问题描述】:
我正在使用 jQuery 的数据表插件,我的 html 页面上有一个我不想排序的表格,但我正在使用该插件对结果进行分页,并且如果表格中没有任何内容,也有空话。使用 ("bSort": false) 阻止表格排序没有问题,但它仍然使表格的标题可点击,这可能会让用户感到沮丧,因为点击时没有任何变化。这是我正在使用的插件:http://datatables.net/,这是我的 HTML:
<table align="center" id="t1" width="57%">
<thead>
<tr>
<th class="headerClass" width="12%">Type</th>
<th class="headerClass">Description</th>
<th class="headerClass" width="3%">Campus</th>
<th class="headerClass" width="14%">Date </th>
</tr>
</thead>
<tbody>
<tr>
<td class="normal"><%=lostFound%></td>
<td class="normal"><%=lostDesc%></td>
<td class="normal"><%=lostLoc%></td>
<td class="normal"><%=lostDate%></td>
</tr>
</tbody>
</table>
这是我的 jS:
var $t1 = $("#t1");
$t1.dataTable({
"bSort": false,
"oLanguage" : bsLfReq.O_LANGUAGE,
"bLengthChange": false,
"bFilter": false,
"bAutoWidth": false,
"iDisplayLength": 3,
"bInfo": false
});
所以基本上我希望表格仍然使用数据表插件,但没有可点击的标题。这可能吗?
【问题讨论】:
-
你应该提到你使用这个插件的jQuery --> datatables.net
标签: javascript jquery html jquery-plugins datatable