Datatables responsive and closest row

Datatables responsive and closest row

itajackassitajackass Posts: 162Questions: 48Answers: 3

I've a table responsive. In the last column i've a TOOLS set of buttons wich show/modify some inputs in the same row. When responsive is disable all is ok. But if responsive is enable, i can't retrieve the row cause the TOOLS buttons moved inside a new row. How can i retrieve always the same row?

$('#example').DataTable( {
responsive: true
} );

$(".btn").on("click", function(e) {
var row = $(this).closest("tr");
var name = row.find(".name").html();
alert(name);
});

A workaroud is set column with buttons tools with the same priority of columns i need...but in a real project i modify all inputs inside columns... so i'm looking for a solution who retrieve me the entire row.

Fiddle: http://jsfiddle.net/ebRXw/3683/

This discussion has been closed.