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

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

SandSand Posts: 6Questions: 0Answers: 0
edited August 2015 in Free community support

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!

Replies

This discussion has been closed.