jQuery Datatables responsive example

HTML

<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
<script src="https://cdn.datatables.net/1.10.9/js/jquery.dataTables.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
<script src="//cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/pdfmake.min.js"></script>
<script src="//cdn.rawgit.com/bpampuch/pdfmake/0.1.18/build/vfs_fonts.js"></script>
<script src="//cdn.datatables.net/buttons/1.0.3/js/buttons.html5.min.js"></script>
<link rel="stylesheet" href="https://cdn.datatables.net/1.10.9/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.0.3/css/buttons.dataTables.min.css">
<script src="https://cdn.datatables.net/buttons/1.2.0/js/dataTables.buttons.js"></script>
<table id="example" class="display" width="100%"></table>

JavaScript

$(document).ready(function() {
    
    var dataSet = [
    [ "Tiger Nixon", "System Architect", "Edinburgh", "5421", "2011/04/25", "$320,800" ],
    [ "Garrett Winters", "Accountant", "Tokyo", "8422", "2011/07/25", "$170,750" ],
    [ "Ashton Cox", "Junior Technical Author", "San Francisco", "1562", "2009/01/12", "$86,000" ]
	];
    
    $('#example').DataTable( {
        deferRender: true,
        destroy: true,
        retrieve: true,
        processing: true,
        paginationType: 'full_numbers',
        data: dataSet,
        columns: [
            { title: "Name" },
            { title: "Position" },
            { title: "Office" },
            { title: "Extn." },
            { title: "Start date" },
            { title: "Salary" }
        ],
        dom: 'B<"clear">lfrtip',
        buttons: [
            {
            extend: 'excelHtml5',
            title: 'ExcelTest'
        },
        {
            extend: 'csvHtml5',
            title: 'CsvTest'
        }
        ]
    } );
    
    var tableSelector = '#example';
    var oTable = $(tableSelector);
    if ( $.fn.dataTable.isDataTable( oTable ) ) {
    	var t = oTable.DataTable();
    	t.destroy();
  	}
    oTable.dataTable({
    deferRender: true,
    destroy: true,
    retrieve: true,
    processing: true,
    paginationType: 'full_numbers',
    data: dataSet,
    
    columns: [
        { title: "Name" },
        { title: "Position" },
        { title: "Office" },
        { title: "Extn." },
        { title: "Start date" },
        { title: "Salary" }
    ],
    dom: 'B<"clear">lfrtip',
    buttons: ['copy', 'csv', 'excel']
  });
    
} );