Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript" language="javascript" >
- $(document).ready(function(){
- var dataTable = $('#dtTable').DataTable({
- "processing":true,
- "serverSide":true,
- "order":[],
- "ajax":{
- url:"<?php echo base_url() . 'controller/query_db'; ?>",
- type:"POST"
- },
- "columnDefs":[{
- "targets":[0, 3, 4],
- "orderable":false,
- },
- ],
- //lengthChange: true,
- "dom": '<"pull-left"B><"pull-left"l><"pull-right"f>tp',
- buttons: [{
- text: 'New Category',
- action: function ( e, dt, node, config ){
- location.href = 'category/cat_crud';
- }
- },
- 'excel', 'colvis'
- ],
- lengthMenu: [ [10, 25, 50, -1], [10, 25, 50, "All"] ],
- });
- table.buttons().container()
- .appendTo( '#dtTable_wrapper .col-sm-6:eq(0)');
- //dropdown
- });
- </script>
Add Comment
Please, Sign In to add comment