[jQuery] Two tablesorter observations...
Hello,
1. Maybe I missed this, but if you don't already, you should state that empty cells cause a "o.childNodes[0] has no properties" error (at least in FF <a href="http://2.0.0.1">2.0.0.1</a>). So empty cells should always have at least a " " to keep tablesorter happy.
2. Is there anyway to make the currency parser more generic? What I mean is that I was trying to sort a column where I wasn't specifying a specific currency and the results were not ordered properly. Then I compared the currency function and found that line 374 had changed from
return s.match(/^[£$]/);
to:
return s.match(/^[$]/);
However, I found I had to do something like this:
return s.match(new RegExp(/^[€$£P$EUR]/));
To handle euros, dollars, pounds, pesos, and euros, respectively. But if I add another currency, then I'll have to edit the source again. :(
Would it be possible to "tag" a column as being of type "currency" to let tablesorter know it should strip off the beginning, non-numerical characters? Maybe using a class like "ts_currency" to avoid possible collisions with an otherwise common classname of "currency"? Then it might be possible to many, some, or none currency symbols.
Thanks in advance,
Christopher.
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/