javascript destroy() code example
Example 1: element destroy js
var myobj = document.getElementById("demo");
myobj.remove();
Example 2: destroy method
Javascript12345var table = $('#myTable').DataTable(); $('#tableDestroy').on( 'click', function () { table.destroy();} );