I'm adding rows dynamically using
table.row.add
and I want to, for every row that is added to the table, to also add an onclick event to that row so it links to a URL.
So, how do I refer to the row that has just been added to add this event?
I'm adding rows dynamically using
table.row.add
and I want to, for every row that is added to the table, to also add an onclick event to that row so it links to a URL.
So, how do I refer to the row that has just been added to add this event?
You can add an onclick
to this event :
$(document).ready(function() {
$('#example').DataTable( {
"createdRow": function ( row, data, index )
{
// here
}
} );
} );