Try adding “bDestroy”: true to the options object literal, e.g.
$('#dataTable').dataTable({
...
....
"bDestroy": true
});
Source: iodocs.com
or Remove the first:
$(document).ready(function() {
$('#example').dataTable();
} );
In your case is the best option vjk.