Getting error - TypeError: Contact.DataTable.fnDestroy is not a function
Getting error - TypeError: Contact.DataTable.fnDestroy is not a function

I have following code that is using data table
Contact.dataTable = $('#table').dataTable( {
.............
},
$('#table tbody').on('click', '.position', function () {
var row = this.parentElement;
var data = Contact.dataTable.row(row).data();
...
}
Since above code was giving error "TypeError: Contact.dataTable.row is not a function", I have changed dataTable to DataTable. But now it gives error "TypeError: Contact.DataTable.fnDestroy is not a function"
Below is the code that gives error
Contact.DataTable = $('#table').DataTable( {
.............
},
$('#table tbody').on('click', '.position', function () {
var row = this.parentElement;
var data = Contact.DataTable.row(row).data();
...
}
if('DataTable' in Contact) {
Contact.DataTable.fnDestroy();
}
Please help!
This discussion has been closed.
Replies
Second top FAQ :-)
Allan