Hi,

I've created a parser and i know that it works properly, because if i
set a column to it in the tablesorter initialization works fine. Next
is the code:

$.tablesorter.addParser({
        id: 'price',
        is: function(s) {
                return false
            },
        format: function(s) {

                var number = Number(s.toLowerCase().replace(/^([0-9]+\.
[0-9]{2}).*/, "$1"));

                if (isNaN(number)) {

                    number = Infinity;

                }

                return number;
            },
        type: 'numeric'
        });


The problem is that i need to set it using metadata, but if i write
<th class="{sorter: 'price'}"> it uses the usual text sorter instead
of mine. What I'm doing wrong?

Thank you so much!

Reply via email to