Bootstrap Table
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="table">
<thead>
<tr>
<th data-field="name">Name</th>
<th data-field="stargazers_count">Stars</th>
<th data-field="forks_count" data-cell-style="cellStyle">Forks</th>
<th data-field="description">Description</th>
</tr>
</thead>
</table>
JavaScript
$table = $('#table');
$(function() {
$table.bootstrapTable({
url: "https://api.myjson.com/bins/d1mzz"
});
});
function cellStyle(value, row, index) {
var classes = ['active', 'success', 'info', 'warning', 'danger'];
if (value < 5) {
return {
classes: classes[4]
};
}
return {};
}