Always No matching records found result in column filter DataTables codeigniter

Always No matching records found result in column filter DataTables codeigniter

ahmadsobahmadsob Posts: 1Questions: 1Answers: 0

I've implementation DataTables in CodeIgniter, using a template sbadmin2 bootstrap. I tried to make the columns search on the DataTables but when try to search the results are No matching records found.

<head>

<link href="<?php echo base_url(); ?>assets/admin/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css" rel="stylesheet">

<!-- DataTables Responsive CSS -->
<link href="<?php echo base_url(); ?>assets/admin/bower_components/datatables-responsive/css/dataTables.responsive.css" rel="stylesheet">
assets/admin/js/jquery-1.7.2.min.js">

</head>
<body>
table in here
</body>


<script src="<?php echo base_url(); ?>assets/admin/bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url(); ?>assets/admin/bower_components/datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.min.js"></script>

$(document).ready(function() { //Setup - add a text input to each footer cell $('#dataTables-example tfoot th').each( function () { var title = $(this).text(); $(this).html( '' ); } ); var table = $('#dataTables-example').DataTable(); // Apply the search table.columns().every( function () { var that = this; $( 'input', this.footer() ).on( 'keyup change', function () { if ( that.search() !== this.value ) { that .search( this.value ) .draw(); } } ); } ); });
This discussion has been closed.