How do I exclude the span tag from being sorted in a table cell?
How do I exclude the span tag from being sorted in a table cell?
Samer
Posts: 2Questions: 1Answers: 0
In my tables I have my data in each cell like this:
<td>
DATA THAT NEEDS TO BE SORTED
<span>Data Label</span>
</td>
How do I stop it from including the span tag in the sorting?
Thanks!
This discussion has been closed.
Answers
In Datatables 1.9, I used aoColumnDefs.mData.
In Datatables 1.10 equivalent is columns.data.
I don't really understand how I'm meant to use that function.
The only code I have at the moment is the initialization code:
var playersTable = $('#players-table').DataTable();
What would I need to do from here?
In datatables 1.9, I would do something like this:
iColIndex is the column index