I'm using jQuery DataTables for one project. I applied datatable to an existing table, as shown below:
var table = '#datatable-1';
var dataTable = $(table).DataTable({
'paging' : true,
'lengthChange': true,
'searching' : true,
'ordering' : true,
'info' : true,
'autoWidth' : false,
select: {
style: 'multi'
}
});
Then I iterate over each row of the table, try to get the row content, but I obtained some HTML inside.
dataTable.rows({
order: 'applied',
page: 'all',
search: 'applied',
selected: true
}).every(function (rowIdx, tableLoop, rowLoop) {
console.log(this.data());
});
And this is the result after I do a console.log(this.data()).
Array [ "A & B", "143 AVE", "", "AMAZON", "EU", "", "<textarea name="" rows="1"></textar…" ]
Anyone knows how to get the row content like is shown in the table?
