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 every ***`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();
}

```

Anyone please help!