Thank you to Josh for helping me resolve this.

After getting this working, I found that I need to approach this a
different way.

Is there any way to access the tablesorter configuration of the table
in question?  When I examine the DOM of the table in Firebug, I can
see the "config" object, and under that I can see the "sortList"
object.  How would I retrieve the data stored in the "sortList"
object?

Thanks,
Carl

On Apr 16, 5:38 pm, Carl Von Stetten <[EMAIL PROTECTED]> wrote:
> UsingjQuery1.2.3
> Firefox 2.0.0.14
>
> I am trying to loop through the headers of a tablesorter table and find
> out which columns are being sorted which way.  I'm building an array of
> arrays that can be fed into the tablesorter.trigger function to resort
> the table after changes are made to the DOM.
>
> The problem I'm having is after .each() iterates successfully through
> the first two columns (which currently are sorted) it then crashes on
> .hasClass().  When I say crashes, I mean that Firebug reports the
> following at the Console:
>
> "$(this).hasclass is not a function"
>
> Here is a snippet of my code.  The id of the table in question is "rdlist".
>
>         var columnsort = new Array();
>         parent.$("#rdlist th").each(function(idx){
>                 var curhead = new Array();
>                 if($(this).hasClass("headerSortDown")){
>                     curhead.push(idx);
>                     curhead.push(0);
>                 }
>                 else if($(this).hasclass("headerSortUp")){
>                     curhead.push(idx);
>                     curhead.push(1);
>                 }
>                 if(curhead.length)columnsort.push(curhead);
>                 console.log(columnsort);
>             });
>
> What am I doing wrong? :-(

Reply via email to