I want to check if a table element with say, id=\"datatable\" is datatables-initialized. Something like this:
if ($(\'#datatable\').dataTable().initialized) {
Datatable has a method to check if an element has been initialized as a datatable or not - $.fn.DataTable.fnIsDataTable
tableElement = document.getElementById('your table ID'); $.fn.DataTable.fnIsDataTable(tableElement); // returns true or false