jQuery DataTables: Column reordering and resizing
Example for article at https://www.gyrocode.com/articles/jquery-datatables-column-reordering-and-resizing/
by Martin Murciego
HTML
<link rel="stylesheet" href="https://cdn.datatables.net/v/dt/dt-1.10.16/datatables.min.css">
<script src="https://cdn.datatables.net/v/dt/dt-1.10.16/datatables.min.js"></script>
<script src="https://cdn.rawgit.com/jeffreydwalter/ColReorderWithResize/4e91eab461130c7b8686684f59c3f50e71ecf8a4/ColReorderWithResize.js"></script>
<h3><a target="_blank" href="https://www.gyrocode.com/articles/jquery-datatables-column-reordering-and-resizing/">jQuery DataTables: Column reordering and resizing</a></h3>
<table id="example" class="display" cellspacing="0" width="100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Extn</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</thead>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>
</table>
JavaScript
$(document).ready(function (){
var table = $('#example').DataTable({
'ajax': 'https://api.myjson.com/bins/qgcu',
'dom': 'Rlfrtip'
});
});