/** * Created by lundberg on 4/2/14. */ // http://datatables.net/plug-ins/sorting jQuery.extend( jQuery.fn.dataTableExt.oSort, { "percent-pre": function ( a ) { var x = (a == "-") ? 0 : a.replace( /%/, "" ); return parseFloat( x ); }, "percent-asc": function ( a, b ) { return ((a < b) ? -1 : ((a > b) ? 1 : 0)); }, "percent-desc": function ( a, b ) { return ((a < b) ? 1 : ((a > b) ? -1 : 0)); } } );