I am new to javascript, I wanted to create a new application which uses a Data table. The data table is dynamically rendered. I have a set of data which is passed as dataSet.
But the problem is I want to add a function "showDetails(id)" for each row (here id refers to row id). Im stuck with this
$(document).ready(function() {
$('#example').DataTable( {
data: dataSet,
columns: [
{ title: "Name" },
{ title: "Position" },
{ title: "Office" },
{ title: "Extn." },
{ title: "Start date" },
{ title: "Salary" }]
} );
} );