Here my code
jQuery.fn.dataTableExt.oSort['num-asc'] = function(a,b) {
var x = a.replace( /<.*?>/g, "" );
var y = b.replace( /<.*?>/g, "" );
x = parseFloat( x );
y = parseFloat( y );
return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};
jQuery.fn.dataTableExt.oSort['num-desc'] = function(a,b) {
var x = a.replace( /<.*?>/g, "" );
var y = b.replace( /<.*?>/g, "" );
x = parseFloat( x );
y = parseFloat( y );
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};
$(document).ready(function() {
$('#ledger').dataTable({
bAutoWidth: false,
bJQueryUI : true,
bProcessing: true,
bServerSide: false,
sPaginationType: "full_numbers",
bStateSave : false,
bUseRendered: false,
iDisplayLength: ${entriesValue},
sDom: mw.superadmin.datatable.relatedListDom,
aLengthMenu: mw.superadmin.datatable.relatedListLengthMenu,
aaSorting: [[0,'asc']],
aoColumns: [
null,
{ "iDataSort": 2},
{ "bVisible": false, "sType": "num"},
{ "iDataSort": 4, "bSortable": true },
{ "bVisible": false, "sType": "num"}
]
});
This table works 100% through and through without issue on IE, FF, Opera, and Safari to my knowlege however with Chrome it fails misserablly but only on 1 specific column of my sortable set. I can’t figure it out, and need a little assistance.
An example of what its doing on Chrome can be found in the image below.

Personally I feel its cause its got characters like ( , [ } ) etc in it.. However like I said other browsers not a problem, Chrome is the only one giving me an issue on this.
I had the same problem where the datatable in Chrome was failing to sort on one column amongst nine. Yet it worked perfectly in Firefox.
To make it work in Chrome, I had to explicitly specify the sType for all the columns.
In my case “html” worked fine.
I guess the auto-detection of column type is failing in Chrome somehow.