<script> $(document).ready(function() { $('#order_data thead th').each(function() { var title = $(this).text(); $(this).html(title + ' <input type="text" class="col-search-input" placeholder="Search ' + title + '" />'); }); var table = $('#order_data').DataTable({ "processing" : true, "serverSide" : true, "order" : [], "ajax" : { url:"fetch.php", type:"POST" }, drawCallback:function(settings) { $('#total_order').html(settings.json.total); }, }); table.columns().every(function() { var table = this; $('input', this.header()).on('keyup change', function() { if (table.search() !== this.value) { table.search(this.value).draw(); } }); }); }); </script>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)