Thursday, October 1, 2009

[jQuery] Re: Tablesorter problems

Hi Mike,
it looks as if you have copied and pasted some illegal characters in to your demo page.
Try removing these and see if that helps.

Best,
Jon

2009/10/1 Mike <michael.dimmock@virgin.net>

Is there no one that can help?

On Sep 30, 4:26 pm, Mike <michael.dimm...@virgin.net> wrote:
> Hi I have recently come across the tablesorter 2.0 for jquery and have
> decided to use it on my website.  I have the examples to work etc.
> however I would like to exclude the first column of my table from
> being sorted and just to remain static irrespect of the other columns
> being sortable.
>
> I have found this :http://stackoverflow.com/questions/437290/exclude-a-column-from-being...
> which is exactly what I needed however when pasting it into my test
> web page I get line 16 parse error (missing before statement).
>
> I have no previous experience of knowledge of jQuery so I would
> appreciate if someone could look at my test page and see what the
> problem is:http://www.freebetsextra.co.uk/tablesorter/tests/freebet3.html.
>
> This is the widget I am trying to use:
>
> $(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']
>     });
>
>
>
> });

No comments: