javascript - jquery tablesorter not sorting negative currency correctly -


The table will not correctly sort 1 column but the second will be it!

I have tried some different custom parser but nobody works. See examples here

  Format: function (s) {// Format your data to normalize var value = replaceAll (',', '', S.toLowerCase ()); // value = replacement all ('-', '', values); // Return Perforate (value location ('$', '')); Return $ .tablesorter.formatFloat (value.replace (new RegExp (/ [^ 0-9 -.] / G), "")); },  

You can see that call 1 is not resolved correctly, but call 2 makes me suspect that it has something to do with negative signal but that is odd that Col2 Works without any custom parser.

About something like this:

  $ Tableorter.addParser ({// A unique ID id is set: 'money', is: function (s) {// return falls, so it is auto detectable;}, format: function (s) { Replace PerseInt (s.replace (/. $ /, ''). Replace (/ \, /, ''), 10);}, // set type, numeric or text type: 'numeric'}); $ ("# Services"). Tanner ({SORTLLIST: [[0,1]], Header: {SOURCE: "money"}, 1: {sorter: "money"}}});  

Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -