【发布时间】:2014-05-31 07:48:10
【问题描述】:
我对 tablesorter 插件和 zebra 小部件选项 zebra 有疑问:["even", "odd"]
我已经为下面的 html 表格实现了表格排序插件
<table class="table table-striped table-condensed static_table_sorter">
<tr class="warning">
<td>Col 1</td>
</tr>
<tr>
<td>Col 1</td>
</tr>
<tr class="warning">
<td>Col 1</td>
</tr>
</table>
tablesorter 的 jQuery 是
$('.static_table_sorter').tablesorter({
// enable debug mode
debug: false,
theme: 'bootstrap',
widthFixed: true,
headerTemplate : '{content} {icon}', // new in v2.7. Needed to add the bootstrap icon!
widgets : [ "uitheme", "filter_checkbox", "zebra","stickyHeaders"],
widgetOptions : {
// using the default zebra striping class name, so it actually isn't included in the theme variable above
// this is ONLY needed for bootstrap theming if you are using the filter widget, because rows are hidden
zebra : ["even", "odd"],
});
等页面加载斑马类偶数和奇数附加到 html 表行自定义类警告。所以我无法得到确切的结果。有人可以帮助我们在出现类警告时如何删除行上的奇偶类
【问题讨论】:
-
看起来您缺少
widgetOptions的右括号
标签: jquery