title: Custom Parser for jQuery Tablesorter
body: <p>I'm using the <a href="http://tablesorter.com/" rel="nofollow noreferrer">jQuery Tablesorter</a> and have an issue with the order in which parsers are applied against table columns.  I'm adding a custom parser to handle currency of the form $-3.33.</p>
  
  <pre><code>$.tablesorter.addParser({
      id: "fancyCurrency",
      is: function(s) {
        return /^\$[\-]?[0-9,\.]*$/.test(s);
      },
      format: function(s) {
        s = s.replace(/[$,]/g,'');
        return $.tablesorter.formatFloat( s );
      },
      type: "numeric"
  });
  </code></pre>
  
  <p>The problem seems to be that the built-in currency parser takes precedence over my custom parser.  I could put the parser in the tablesorter code itself (before the currency parser) and it works properly, but this isn't very maintainable.  I can't specify the sorter manually using something like:</p>
  
  <pre><code>headers: {
      3: { sorter: "fancyNumber" },
      11: { sorter: "fancyCurrency" }
  }
  </code></pre>
  
  <p>since the table columns are generated dynamically from user inputs.  I guess one option would be to specify the sorter to use as a css class and use some JQuery to explicitly specify a sorter like <a href="https://stackoverflow.com/questions/889117/adding-metadata-parser-to-a-table-header">this question</a> suggests, but I'd prefer to stick with dynamic detection if possible.</p>