Bootstrap分页无法正常工作。我没有在pager的文本框中看到页面#,它在jquery.tablesorter.pager.js函数moveToFirstPage ln#33(即table.config)中抛出错误。 table.config不可用。
代码如下:
<table cellspacing="1" class="tablesorter">
<thead>
<tr>
<th>col1</th>
<th>col2</th>
</tr>
</thead>
<tbody>
<tr>
<td>val1</td>
<td>val2</td>
</tr>
</tbody>
</table>
<div id="pager" class="pager" style="position:absolute;width:100%;background-color:#8F8F8F;color:White;">
<form>
<img src="@Url.Content("~/Content/images/first.png")" class="first"/>
<img src="@Url.Content("~/Content/images/prev.png")" class="prev"/>
<input type="text" class="pagedisplay" readonly="readonly" style="width:auto" />
<img src="@Url.Content("~/Content/images/next.png")" class="next"/>
<img src="@Url.Content("~/Content/images/last.png")" class="last"/>
Show <select class="pagesize" style="width:auto;">
<option selected="selected" value="10">10</option>
<option value="20">20</option>
<option value="30">30</option>
<option value="40">40</option>
</select> items
</form></div>
Jquery的:
$("table").tablesorterPager({ container: $("#pager") });
缺少什么?
答案 0 :(得分:1)
你所缺少的最重要的事情是制作表本身的表格分类器。只需在tablesorter
之前拨打tablesorterPager
即可。
$("table").tablesorter().tablesorterPager({ container: $("#pager") });
BTW,您的表格行和寻呼机选项需要正确设置。