Problem with with span and columnDefs
Problem with with span and columnDefs
tegger
Posts: 2Questions: 1Answers: 0
Hi,
i need help with sorting and a mouseover tooltip
i use <td id="grungruppe"> <div class="tooltip">1050 <span class="tooltiptext"> TEST</span> </div> </td>
to create a Number with mouseover tooltip. But datatable can now not use it as a number, still manual override with html-num or num did not work
$(document).ready(function() {
$('#example').DataTable({
paging: false,
bFilter: false
,
"columnDefs": [
{ "type": "html-num", "targets": 19 }
]
});
} );
How could i solve this ?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
If you strip the HTML you are left with
1050 TEST
which is why DataTables is string sorting that column.You'd probably need to implement your own custom ordering plug-in for that, pulling out the data that you want from the HTML.
Orthogonal data is another approach you could consider.
Allan
thanks, the orthogonal data are working perfectly