<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Easy table sorting with jQuery</title>
	<atom:link href="http://blog.amnuts.com/2009/01/29/easy-table-sorting-with-jquery/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.amnuts.com/2009/01/29/easy-table-sorting-with-jquery/</link>
	<description>php projects, javascript, and... stuff.</description>
	<lastBuildDate>Fri, 07 May 2010 09:32:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Andy</title>
		<link>http://blog.amnuts.com/2009/01/29/easy-table-sorting-with-jquery/comment-page-1/#comment-81</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Thu, 11 Feb 2010 09:33:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.amnuts.com/?p=115#comment-81</guid>
		<description>bnaffas; have you tried creating your own parser for the column that contains the percentages?  Something like:

[code language=&quot;javascript&quot;]
    $.tablesorter.addParser({
        id     : &#039;percentages&#039;,
        type   : &#039;numeric&#039;,
        is     : function(s) { return false; },
        format : function(s) {
            var reg = /(.*?)%/i;
            if (reg.test(s)) {
                var match = reg.exec(s);
                return parseInt(match[1]);
            } else {
                return parseInt(s);
            }
        }
    });
[/code]

And than you include it such as:

[code language=&quot;javascript&quot;]
$(&quot;table&quot;).tablesorter({
  headers: {
    3: { sorter:&#039;percentages&#039; }
  }
});
[/code]

where &#039;3&#039; is the column number where your percentages are.

As I&#039;ve just got it together this morning, I can&#039;t promise the above is exact! :)</description>
		<content:encoded><![CDATA[<p>bnaffas; have you tried creating your own parser for the column that contains the percentages?  Something like:</p>
<pre class="brush: jscript;">
    $.tablesorter.addParser({
        id     : 'percentages',
        type   : 'numeric',
        is     : function(s) { return false; },
        format : function(s) {
            var reg = /(.*?)%/i;
            if (reg.test(s)) {
                var match = reg.exec(s);
                return parseInt(match[1]);
            } else {
                return parseInt(s);
            }
        }
    });
</pre>
<p>And than you include it such as:</p>
<pre class="brush: jscript;">
$(&quot;table&quot;).tablesorter({
  headers: {
    3: { sorter:'percentages' }
  }
});
</pre>
<p>where &#8216;3&#8242; is the column number where your percentages are.</p>
<p>As I&#8217;ve just got it together this morning, I can&#8217;t promise the above is exact! <img src='http://blog.amnuts.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bnaffas</title>
		<link>http://blog.amnuts.com/2009/01/29/easy-table-sorting-with-jquery/comment-page-1/#comment-80</link>
		<dc:creator>bnaffas</dc:creator>
		<pubDate>Wed, 10 Feb 2010 23:05:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.amnuts.com/?p=115#comment-80</guid>
		<description>I am using this sorting library too. Have you run into an issue with sorting percents? 

Given the following values { 2.0%, 25%, 10% }, the library will sort the values as {10%, 2.0%, 25% } because of the plain text sorting on the 1 versus the 2 (in both 2.0 and 25).</description>
		<content:encoded><![CDATA[<p>I am using this sorting library too. Have you run into an issue with sorting percents? </p>
<p>Given the following values { 2.0%, 25%, 10% }, the library will sort the values as {10%, 2.0%, 25% } because of the plain text sorting on the 1 versus the 2 (in both 2.0 and 25).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uzume</title>
		<link>http://blog.amnuts.com/2009/01/29/easy-table-sorting-with-jquery/comment-page-1/#comment-54</link>
		<dc:creator>Uzume</dc:creator>
		<pubDate>Thu, 12 Feb 2009 17:30:14 +0000</pubDate>
		<guid isPermaLink="false">http://blog.amnuts.com/?p=115#comment-54</guid>
		<description>Hi Andy,

This is a bit off topic but I have not heard from you in a long time and I was wondering what was up. I noticed all the topics on your PHP forum are locked and the talker site seems to be down (always just says &quot;It works!&quot; or some such).

I was not sure what the best way to contact you was.

Cheers,
Uzume</description>
		<content:encoded><![CDATA[<p>Hi Andy,</p>
<p>This is a bit off topic but I have not heard from you in a long time and I was wondering what was up. I noticed all the topics on your PHP forum are locked and the talker site seems to be down (always just says &#8220;It works!&#8221; or some such).</p>
<p>I was not sure what the best way to contact you was.</p>
<p>Cheers,<br />
Uzume</p>
]]></content:encoded>
	</item>
</channel>
</rss>
