Bootstrap Table
by jimkennelly
HTML
<link rel="stylesheet" href="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.css">
<script src="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.js"></script>
<table id="testTable" data-toggle="table" data-url="https://api.github.com/users/wenzhixin/repos" data-pagination="true" data-search="true" data-height="300">
<thead>
<tr>
<th data-field="name">Name</th>
<th data-field="stargazers_count">Stars</th>
<th data-field="forks_count">Forks</th>
<th data-field="description">Description</th>
</tr>
</thead>
</table>
JavaScript
var pageSize=0;
function queryParams() {
return {
type: 'owner',
sort: 'updated',
direction: 'desc',
per_page: 100,
page: 1
};
}
$('#testTable').on('page-change.bs.table', function(e, name, args) {
console.log('Event:', name, ', data:', args);
alert('Page size:' + args)
pageSize=args;
})