Data Table

Introduction

DataTables is a plug-in for the jQuery Javascript library. It is a highly flexible tool, build upon the foundations of progressive enhancement, that adds all of these advanced features to any HTML table.

How to Setup

HTML Structure

<table id="datable_1" class="table table-hover display pb-30">
<thead>
	<tr>
		<th>Name</th>
		<th>Position</th>
		<th>Office</th>
		<th>Age</th>
		<th>Start date</th>
		<th>Salary</th>
	</tr>
</thead>
<tbody>
	<tr>
		<td>Tiger Nixon</td>
		<td>System Architect</td>
		<td>Edinburgh</td>
		<td>61</td>
		<td>2011/04/25</td>
		<td>$320,800</td>
	</tr>
	<tr>
		<td>Garrett Winters</td>
		<td>Accountant</td>
		<td>Tokyo</td>
		<td>63</td>
		<td>2011/07/25</td>
		<td>$170,750</td>
	</tr>
	<tr>
		<td>Ashton Cox</td>
		<td>Junior Technical Author</td>
		<td>San Francisco</td>
		<td>66</td>
		<td>2009/01/12</td>
		<td>$86,000</td>
	</tr>
	....
	<tr>
		<td>Donna Snider</td>
		<td>Customer Support</td>
		<td>New York</td>
		<td>27</td>
		<td>2011/01/25</td>
		<td>$112,000</td>
	</tr>
</tbody>
<tfoot>
	<tr>
		<th>Name</th>
		<th>Position</th>
		<th>Office</th>
		<th>Age</th>
		<th>Start date</th>
		<th>Salary</th>
	</tr>
</tfoot>
</table>

Dependency

CSS

JS

Initialize Data Table JS

Last updated

Was this helpful?