I have three datatables on a page that each have the first column having '.details-control' item. Instead of having three different onClick functions I would like to make just one. To do that, I need:
1) the onClick to know what datatable is clicked
2) I need to access the third data element for each table instead of hard-coding the field name since for each table the field name will be different.I tried data[0][3] as well as data[0,3] and even data[3]. None of these worked.
What is the syntax for each of these two items?
$('.display tbody').on('click', '.details-control', function (e) {
e.preventDefault(); //TODO: not working!!!!!!!!! Don't want to select/deselect when .details-control is clicked
var data = dependencytable.row($(this).parents('tr')).data(); //don't want to hardcode the tablename
alert(data["Dependencies"]["note"]); //don't want to hardcode the data element name
});