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 data-toggle="table"
       data-url="https://api.myjson.com/bins/b8lb6"
       data-click-to-select="true">
    <thead>
    <tr>
           <th data-field="name" data-formatter="formatRow">Name</th>

        <th data-sortable="true" data-field="IsSelected" data-formatter="formatCheck">Selected</th>
        <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

function formatCheck(value){
return '<input type="checkbox" ' + (value==1 ? ' checked ' : '' ) + '</input>';
}
function formatRow(value,row,index){

return JSON.stringify(row);
}