Fix: Update for jQuery 3.3 deprecated functions

pull/377/head
Allan Jardine 6 years ago
parent 7a6ff3585f
commit da67f99c24

@ -70,7 +70,7 @@
}
};
if ($.isNumeric(config.speed) || $.type(config.speed) === 'string') {
if ( config.speed !== undefined ) {
speed = config.speed;
}

@ -19,9 +19,10 @@ jQuery.fn.dataTableExt.aTypes.unshift(
function ( sData )
{
var deformatted = sData.replace(/[^\d\-\.\/a-zA-Z]/g,'');
if ( $.isNumeric( deformatted ) || deformatted === "-" ) {
return 'formatted-num';
}
return null;
var isNumeric = !isNaN( deformatted - parseFloat( deformatted ) );
return isNumeric || deformatted === "-" ?
'formatted-num' :
null;
}
);

Loading…
Cancel
Save