Reputation: 21
so i have a table like this
<table class="table table-striped table-bordered" id="results" style="direction:rtl;">
<thead>
<tr><td>شماره</td><td>شماره اختصاصی</td><td>نام فرستده</td><td>تاریخ ارسال</td><td>وضعیت انتشار</td><td>نمایش</td></tr>
</thead>
<tbody>
<tr>
<td>1231</td>
<td>31311010119</td>
<td>sdfsdfsdfsdfsdf</td>
<td>1400/3/17</td>
<td><span style="color:red;">test</span></td>
<td><button data-content="test
test
test" style="width:100%;" id="display_post_contect" type="button" class="btn btn-warning">display</button></td>
</tr>
<td>1053</td>
continues ....
</tr>
<tr>
<td>1054</td>
continues ....
</tr>
</tbody>
</table>
and i have included both tablesorter and tablesorterpager inside $(document).ready()
<script src="<?php echo $js_dir; ?>jquery.tablesorter.js"></script>
<script src="<?php echo $js_dir; ?>jquery.tablesorter.pager.js"></script>
this is how im using the plugin inside jquery
$('table.table').tablesorter();
$('table.table').tablesorterPager();
and it does work meaning when the html table with about 300 rows loads in page the pager plugin only displays the first 10 rows but there is no next/prev buttons being displayed above or below the table what am i missing here ?
thanks in advance.
Upvotes: 1
Views: 75
Reputation: 1216
Should work.
See the full example with all parameters here: https://mottie.github.io/tablesorter/docs/example-pager.html
$("table").tablesorter();
and then
var pagerOptions = {
// starting page of the pager (zero based index)
page: 1,
// Number of visible rows - default is 10
size: 100,
}
$("table").tablesorterPager(pagerOptions);
So you should get 100 per Page - 10 is the default value.
Upvotes: 1