JSFiddle - React, Tailwind, and code Playground
by Rikesh Ramlochund
HTML
<script src="http://yadcf-showcase.appspot.com/resources/js/jquery.dataTables.min.js"></script>
<script src="http://yadcf-showcase.appspot.com/resources/js/jquery.dataTables.yadcf.js"></script>
<link rel="stylesheet" href="http://yadcf-showcase.appspot.com/resources/css/jquery.dataTables.css">
<link rel="stylesheet" href="http://yadcf-showcase.appspot.com/resources/css/jquery.dataTables.yadcf.css">
<a href="#" id="create">Create</a> | <a href="#" id="destroy"> Destroy</a>
<table id="mytable" class="results table table-striped">
<thead>
<tr>
<th>Head 1</th>
<th>Head 2</th>
<th>Head 3</th>
</tr>
</thead>
<tbody>
<tr>
<td>12</td>
<td>13</td>
<td>14</td>
</tr>
<tr>
<td>12</td>
<td>13</td>
<td>14</td>
</tr>
<tr>
<td>152</td>
<td>13</td>
<td>154</td>
</tr>
<tr>
<td>1762</td>
<td>1873</td>
<td>1874</td>
</tr>
<tr>
<td>124</td>
<td>1343</td>
<td>1124</td>
</tr>
</tbody>
</table>
JavaScript
var oTable = $('table');
$('#create').click(function (e) {
e.preventDefault();
oTable.dataTable({
"bJQueryUI": true,
"bStateSave": true,
"bPaginate": false,
"bAutoWidth": false,
});
});
$('#destroy').click(function (e) {
e.preventDefault();
oTable.fnDestroy();
oTable.attr('class', '');
});