Java Script

Datatable Button Change in Javascript

<script>
$('#datatable_buttons').DataTable({
  dom: 'Bfrtip',
  buttons: [{
      "extend": 'copy',
      "text": 'Copy',
      'className': 'btn btn-light'
    },
    {
      "extend": 'csv',
      "text": 'CSV',
      'className': 'btn btn-light'
    },
        {
      "extend": 'excel',
      "text": 'Excel',
      'className': 'btn btn-light'
    },    {
      "extend": 'pdf',
      "text": 'PDF',
      'className': 'btn btn-light'
    },
        
    {
      "extend": 'print',
      "text": 'Print',
      'className': 'btn btn-light'
    }
  ],
  initComplete: function() {
    var btns = $('.dt-button');
    btns.removeClass('dt-button');
  },
});
</script>

Leave a Reply

Your email address will not be published.