Hi I am having problems getting table sorter to work properly.

I would like to exclude the first column in my table from being sort
and I have found this code to do so:

<code>$(function() {
    // add new widget called indexFirstColumn
    $.tablesorter.addWidget({
        // give the widget a id
        id: "indexFirstColumn",
        // format is called when the on init and when a sorting has
finished
        format: function(table) {
                // loop all tr elements and set the value for the
first column
                for(var i=0; i < table.tBodies[0].rows.length; i++) {
                        $("tbody tr:eq(" + (i - 1) + ")
td:first",table).html(i);
                }
        }
    });

    $("table").tablesorter({
        widgets: ['zebra','indexFirstColumn']
    });

});</code>


However when I place it in my page it does not function and breaks the
sorting altogether.  I do not know if there is a syntax problem, to be
honest I know nothing of jQuery!

This is the page that does not work:

<a href="http://www.freebetsextra.co.uk/tablesorter/tests/
freebet3.html">my webpage</a>

Please can someone help.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to