I am working with datatables example and getting an error like this when loading page: Datatables warning(table id = \'example\'): cannot reinitialise data table. To retriev
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.