Datatables 1.10.8 - example
HTML
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.8/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.0.0/css/buttons.dataTables.min.css">
<script src="https://cdn.datatables.net/1.10.8/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.0.0/js/dataTables.buttons.min.js"></script>
<script src="//cdn.datatables.net/buttons/1.0.0/js/buttons.html5.min.js"></script>
<script src="//cdn.datatables.net/buttons/1.0.0/js/buttons.print.min.js"></script>
<script src="//cdn.datatables.net/buttons/1.0.0/js/buttons.colVis.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
<script src="//cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"></script>
<script src="//cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<script src="https://cdn.datatables.net/select/1.0.0/js/dataTables.select.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/select/1.0.0/css/select.dataTables.min.css">
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Salary</th>
</tr>
</tfoot>
<tbody>
<tr>
<td></td>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>$320,800</td>
</tr>
<tr>
<td></td>
<td>Garrett Winters</td>
<td>Accountant</td>
...
JavaScript
$(document).ready(function () {
$('#example').DataTable({
dom: 'fBt<"table-footer"ip>',
'searching': true,
'select': {
'style': 'multi',
'selector': 'td:first-child'
},
'paging': true,
'info': true,
'stateSave': true,
columnDefs: [{
orderable: false,
className: 'select-checkbox',
targets: [0]
}, {
'targets': [5],
'sortable': false
}],
buttons: [{
extend: 'collection',
text: '',
className: 'fa fa-cog',
buttons: [{
'extend': 'colvis',
'columns': [1, 2, 3, 4]
}, {
'extend': 'copyHtml5',
'exportOptions': {
'modifier': {
'search': 'applied'
},
'columns': '.sorting'
}
}, {
'extend': 'excelHtml5',
'exportOptions': {
'modifier': {
'search': 'applied'
},
'columns': '.sorting'
}
}, {
'extend': 'csvHtml5',
'exportOptions': {
'modifier': {
'search': 'applied'
},
'columns': '.sorting'
}
},
'pdfHtml5']
}]
});
});