jquery datatable custom sort the first row has no effect, the data is float, like 11.1 22.2 33.3, using the extension method, but after using it, except for the abnormal sorting of the first row, everything else is sorted normally, which is strange
.$(document) .ready (function () {
jQuery.extend(jQuery.fn.dataTableExt.oSort, {
"float": function ( a ) {
return parseFloat( a );
},
"float-asc": function ( a, b ) {
return a - b;
},
"float-desc": function ( a, b ) {
return b - a;
}
} );
$("-sharptable").DataTable({
searching: false,
"aoColumnDefs": [
{ "sType": "float", "aTargets": [ 3 ] }
],
order: [],
"language": {
"url": "//cdn.datatables.net/plug-ins/1.10.19/i18n/Chinese.json"
}
});
js