&lt;!-- required files --&gt;
&lt;link href="../assets/plugins/datatables.net-bs5/css/dataTables.bootstrap5.min.css" rel="stylesheet" /&gt;
&lt;link href="../assets/plugins/datatables.net-responsive-bs5/css/responsive.bootstrap5.min.css" rel="stylesheet" /&gt;
&lt;link href="../assets/plugins/datatables.net-buttons-bs5/css/buttons.bootstrap5.min.css" rel="stylesheet" /&gt;
&lt;link href="../assets/plugins/datatables.net-colreorder-bs5/css/colReorder.bootstrap5.min.css" rel="stylesheet" /&gt;
&lt;link href="../assets/plugins/datatables.net-keytable-bs5/css/keyTable.bootstrap5.min.css" rel="stylesheet" /&gt;
&lt;link href="../assets/plugins/datatables.net-rowreorder-bs5/css/rowReorder.bootstrap5.min.css" rel="stylesheet" /&gt;
&lt;link href="../assets/plugins/datatables.net-select-bs5/css/select.bootstrap5.min.css" rel="stylesheet" /&gt;

&lt;script src="../assets/plugins/datatables.net/js/dataTables.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-bs5/js/dataTables.bootstrap5.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-responsive/js/dataTables.responsive.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-responsive-bs5/js/responsive.bootstrap5.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-colreorder/js/dataTables.colReorder.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-colreorder-bs5/js/colReorder.bootstrap5.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-keytable/js/dataTables.keyTable.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-keytable-bs5/js/keyTable.bootstrap5.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-rowreorder/js/dataTables.rowReorder.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-rowreorder-bs5/js/rowReorder.bootstrap5.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-select/js/dataTables.select.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-select-bs5/js/select.bootstrap5.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-buttons/js/dataTables.buttons.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-buttons-bs5/js/buttons.bootstrap5.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-buttons/js/buttons.colVis.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-buttons/js/buttons.html5.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/datatables.net-buttons/js/buttons.print.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/pdfmake/build/pdfmake.min.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/pdfmake/build/vfs_fonts.js"&gt;&lt;/script&gt;
&lt;script src="../assets/plugins/jszip/dist/jszip.min.js"&gt;&lt;/script&gt;

&lt;!-- html --&gt;
&lt;table id="data-table-combine" width="100%" class="table table-striped table-bordered align-middle text-nowrap"&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th width="1%"&gt;&lt;/th&gt;
      &lt;th width="1%" data-orderable="false"&gt;&lt;/th&gt;
      ...
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    ...
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;!-- script --&gt;
&lt;script&gt;
  var options = {
    dom: '<"row mb-3"<"col-lg-8 d-lg-block"<"d-flex d-lg-inline-flex justify-content-center mb-md-2 mb-lg-0 me-0 me-md-3"l><"d-flex d-lg-inline-flex justify-content-center mb-md-2 mb-lg-0 "B>><"col-lg-4 d-flex d-lg-block justify-content-center"fr>>t<"row mt-3"<"col-md-auto me-auto"i><"col-md-auto ms-auto"p>>',
    buttons: [
      { extend: 'copy', className: 'btn-sm' },
      { extend: 'csv', className: 'btn-sm' },
      { extend: 'excel', className: 'btn-sm' },
      { extend: 'pdf', className: 'btn-sm' },
      { extend: 'print', className: 'btn-sm' }
    ],
    responsive: true,
    colReorder: true,
    keys: true,
    rowReorder: true,
    select: true
  };

  if ($(window).width() <= 767) {
    options.rowReorder = false;
    options.colReorder = false;
  }
  $('#data-table-combine').DataTable(options);
&lt;/script&gt;