I'm trying to get the "data-" attribute in the <td>
elements of a jquery datatable plugin:
i can recovery all the rows of the datatable with:
$("#tabla-transmisiones").dataTable()._('tr', {"filter": "applied"})
or
table.rows().data()
but I need to read the "data-" attributes of each <td>
element in datatable row.
Here the solution:
$("#tablename").dataTable()._('tr', {"filter": "applied"}).rows(nrow).nodes().to$().find('td[data-yourattr]').data("yourattr");
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments