For implementing paging,search & sorting using the datatable.js library.
<link
rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css">
<table
id="table_id" class="display">
<thead>
<tr>
<th>Name</th>
<th>DOB</th>
</tr>
</thead>
<tbody>
<tr>
<td>Amar</td>
<td>10-10-2010</td>
</tr>
<tr>
<td>Akbar</td>
<td>20-11-2010</td>
</tr>
</tbody>
</table>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
<script>
$(document).ready(function () {
$('#table_id').DataTable();
});
</script>
No comments:
Post a Comment