<html>
<head>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/dt/jq-2.1.4,dt-1.10.9,cr-1.2.0/datatables.min.css"/>
<script type="text/javascript" src="https://cdn.datatables.net/r/dt/jq-2.1.4,dt-1.10.9,cr-1.2.0/datatables.min.js"></script>
</head>
<body>
  
  <button>Show column</button>
  <table id="example">
    <tbody/>
  </table>
</body>
</html>
 
var options = {
  columns: [{title: 'foo'}, {title: 'bar', visible: false}],
  colReorder: true,
  dom: 't'
};
var options2 = {
  columns: [{title: 'foo'}, {title: 'bar', visible: true}],
  colReorder: true,
  dom: 't',
  destroy: true,
};
$('#example').dataTable(options);
$('button').click(function() {
  $('#example').dataTable(options2);
});
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers