i've built up a table with dataTable jQuery plugin. I am trying to get the td data of a tr element by clicking on that tr. I've read the documentation which says that i have to use "fnGetData", but when i try that, i get the error:
TypeError: table.fnGetData is not a function
var data = table.fnGetData( this );
My js Code:
$('#customerTable tbody').on('click','tr', function(){
var data = table.fnGetData( this );
alert(data);
});
My DataTable is initialized as the following, working well without the click event:
var table = $('#customerTable').DataTable( {..});
Do I have to bind another plugin script in my html head section?
Regards.