DataTable 1.10.10 + Bootstrap

Buttons Test

HTML

<script src="https://cdn.datatables.net/s/bs-3.3.5/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.10,b-1.1.0,b-colvis-1.1.0,b-html5-1.1.0,b-print-1.1.0,fc-3.2.0,fh-3.1.0,r-2.0.0,sc-1.4.0,se-1.1.0/datatables.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/s/bs-3.3.5/jq-2.1.4,jszip-2.5.0,pdfmake-0.1.18,dt-1.10.10,b-1.1.0,b-colvis-1.1.0,b-html5-1.1.0,b-print-1.1.0,fc-3.2.0,fh-3.1.0,r-2.0.0,sc-1.4.0,se-1.1.0/datatables.min.css">
<div class="page-header">
  <h1>Example page header <small>Subtext for header</small></h1>
</div>

<div>
  <table class="table table-striped table-hover" id="mytable">
    <thead>
      <tr>
        <th id='info' scope="col" colspan='2' class='col-info'>
          Info
        </th>
        <th id='dataGroup1' colspan='3' class='col-dataGroup1'>
          DataGroup 1
        </th>
        <th id='dataGroup2' colspan='4' class='col-dataGroup2'>
          DataGroup 2
        </th>
      </tr>
      <tr>
        <th class='col-info'>
          Line #
        </th>
        <th class='col-info'>
          EmpID
        </th>
        <th class='col-dataGroup1'>
          SID
        </th>
        <th class='col-dataGroup1'>
          First&#160;Name
        </th>
        <th class='col-dataGroup1'>
          Last&#160;Name
        </th>
        <th class='col-dataGroup2'>
          Type
        </th>
        <th class='col-dataGroup2'>
          App ID
        </th>
        <th class='col-dataGroup2'>
          Batch ID
        </th>
        <th class='col-dataGroup2'>
          Correlation&#160;ID
        </th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>
          1
        </td>
        <td>
          12
        </td>
        <td>
          456
        </td>
        <td>
          Barney
        </td>
        <td>
          Gumble
        </td>
        <td>
          P Adj
        </td>
        <td>
          1
        </td>
        <td>
          1
        </td>
        <td>
          1
        </td>
     ...

JavaScript

$('#mytable').DataTable({
  "dom": 'lBfrtip',

  buttons: [{
      extend: 'columnToggle',
      text: 'Info',
      columns: '.col-info',
    },

    {
      extend: 'columnToggle',
      text: 'DataGroup 1',
      columns: '.col-dataGroup1',
    },

    {
      extend: 'columnToggle',
      text: 'DataGroup 2',
      columns: '.col-dataGroup2',
    },
  ],
  // enable x-scrolling
  "scrollX": true,
});