Bootstrap Table

by Juan Muñoz

HTML

<link rel="stylesheet" href="https://rawgit.com/wenzhixin/bootstrap-table/master/src/bootstrap-table.css">
<script src="https://rawgit.com/dimbslmh/bootstrap-table/master/src/bootstrap-table.js"></script>
<script src="https://rawgit.com/dimbslmh/bootstrap-table/master/src/extensions/multiple-sort/bootstrap-table-multiple-sort.js"></script>
<button id="resetView" class="btn btn-default">Reset View</button>
<table id="table" data-toggle="table" data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/" data-show-multi-sort="true" data-sort-priority='[{"sortName":"name","sortOrder":"desc"},{"sortName":"stargazers_count","sortOrder":"desc"},{"sortName":"forks_count","sortOrder":"desc"}]' data-show-columns="true">
    <thead>
        <tr>
            <th data-field="name" data-sortable="true">Name</th>
            <th data-field="stargazers_count" data-sortable="true">Stars</th>
            <th data-field="forks_count" data-sortable="true">Forks</th>
            <th data-field="description" data-sortable="true">Description</th>
        </tr>
    </thead>
</table>

CSS

body {
    padding:20px
}

JavaScript

$('#resetView').click(function () {
    $('#table').bootstrapTable('resetView');
});