Bootstrap Table

by Newton Anbarasu

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>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<div id="toolbar" class="btn-group">
    <button type="button" class="btn btn-default">
        <i class="fa fa-plus"></i>
    </button>
    <button type="button" class="btn btn-default">
        <i class="fa fa-heart"></i>
    </button>
    <button type="button" class="btn btn-default">
        <i class="fa fa-trash"></i>
    </button>
</div>
<table data-toggle="table"
       data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/"
       data-search="true"
    data-show-pagination-switch="true"
       data-show-refresh="true"
       data-show-toggle="true"
       data-show-columns="true"
       data-icons-prefix="fa"
               data-icons="icons"
       data-toolbar="#toolbar"
>
    <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

window.icons = {
        paginationSwift:'fa-collapse-up',
        refresh: 'fa-refresh',
        toggle: 'fa-toggle-on',
        columns: 'fa-th-list'
    };