DataTable-Objects are not independent?
DataTable-Objects are not independent?
Hi.
After searching a couple minutes (about 80-100) I found a behavior that I can't explain. Perhabs sb could give me a hint?
So, this code is working as expected. ANd if I don't delete them, I see my 2 well formated tables.
table0 = $('#tabelle0').DataTable();
table1 = $('#tabelle1').DataTable();
table1.destroy();
table0.destroy();
On the other side, this code:
table0 = $('#tabelle0').DataTable();
table1 = $('#tabelle1').DataTable();
table0.destroy();
table1.destroy();
produces the JS-error-output in the JS-console: "Uncaught DOMException: Node.insertBefore: Child to insert before is not a child of this node".
That means, these objects are not really independent? Is there a datatable-DOM-principle I didn't understand?
Thank you.
Answers
Placing your code snippets in this test case show it works destroying in either order works:
http://live.datatables.net/piyajiqo/1/edit
Please update the test case to show the issue.
Are these statements initializing your Datatables or just getting the API?
Kevin
Thank you for your answer.
http://live.datatables.net/vedifogu/1/edit shows the error with my dataset. It seems that there is something wrong in my dataset, but I don't find a clue.
Thank you looking over it.Perhabs there is a reaon for more than this behavior I'm fighting on...
PS: I guess, I'm initializing the Datatables with these statements...
Got it!
The error occures, if you write the HTML between the two tables this way:
and works with that definition