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="table1" data-toggle="table" data-url="/gh/get/response.json/wenzhixin/bootstrap-table/tree/master/docs/data/data1/" data-search="true" data-search-text="boot">
<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>
<button id="btnSearch">
Search for password
</button>
<div id="lista">
</div>
JavaScript
$("#btnSearch").click(function(){
$("#table1").bootstrapTable('resetSearch','password');
});
var listacriterios ={"criterio":"test"};
var newTable_al= '';
newTable_al += '<table class="table table-condensed" id="asProfessor"><thead><tr>';
newTable_al += '<th data-field="nombre" >Usuario</th>'
$.each(listacriterios, function(index, value) {
newTable_al += '<th data-field="criterio'+index+'" data-editable="true" >'+value["criterio"]+'</th>'
})
newTable_al += '</tr></thead></table>';
$('#lista').empty().append(newTable_al);