Data Table Custimized code.
Copy Below Code
View As A Text File
Show Text Only
Show API
Edit Code
$('#hpcDatatable22 thead tr').clone(true).appendTo('#hpcDatatable22 thead');
$('#hpcDatatable22 thead tr:eq(1) th').each(function(i) {
var title = $(this).text();
$(this).html('<input type="text" placeholder="Search..." />');
$('input', this).on('keyup change', function() {
if (table.column(i).search() !== this.value) {
table
.column(i)
.search(this.value)
.draw();
}
});
});
// DataTable
var table = $('#hpcDatatable22').DataTable({
orderCellsTop: true,
fixedHeader: true,
"order": [],
"columnDefs": [{
"targets": 'no-sort',
"orderable": true
}],
dom: 'Bfrtip',
buttons: [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
});