Cannot reinitialize datatable in Jquery

Cannot reinitialize datatable in Jquery

<script type="text/javascript">
    $(document).ready(function() {

	    if ($.fn.DataTable.isDataTable("#table")) {
		    $('#table').DataTable().clear().destroy();
		}

	    $('#table').DataTable();

    });
</script>

click for more jquery codes, read in detail about datatables