<script src="<?php echo base_url('assets/js/lib/data-table/datatables.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/data-table/dataTables.bootstrap.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/data-table/dataTables.buttons.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/data-table/buttons.bootstrap.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/data-table/jszip.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/data-table/vfs_fonts.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/data-table/buttons.html5.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/data-table/buttons.print.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/lib/data-table/buttons.colVis.min.js'); ?>"></script>
<script src="<?php echo base_url('assets/js/init/datatables-init.js'); ?>"></script>

<script type="text/javascript">
        $(document).ready(function() {
          $('#bootstrap-data-table-export').DataTable();
      } );
 
$(function() {
    var schedulingGrid = $('.dataTable-custom').DataTable({
        "processing": true,
        "serverSide": true,
        "ajax": "<?php echo base_url(); ?>" + $(this).data("ajax"),
        "iDisplayLength": 10,
        "aLengthMenu": [
            [10, 25, 50, -1],
            [10, 25, 50, "All"]
        ],
        "columnDefs": [{
            "targets": [ 0 ],
            "visible": false,
            "searchable": false
        }]
    });
    var table = $('#activity_table').DataTable();
    var data = new Array();
    $('input[type=text]').on('keyup', function () {
        var i = $(this).attr('data-column');
        var v = $(this).val();
        schedulingGrid.columns(i).search(v).draw();            
    })
});
        
</script>