Here is example of table presently working on. I using the code below,
but getting error message:

$(document).ready(function() {

    // call the tablesorter plugin
    $("table").tablesorter({
        // define a custom text extraction function
        textExtraction: function(node) {
            // extract data from markup and return it
            return node.childNodes[0].childNodes[0].innerHTML;
        }
    });
});

Error: node.childNodes[0].childNodes[0] is undefined

Example row:
<td>54</td><td>34</td><td><a hred='something' target='_blank'>blah</
a></td>


On Oct 26, 6:55 pm, ChaosAD <chao...@gmail.com> wrote:
> Thanks, I will tomorrow when back at work. Right now it is data in
> <td> themselves and links inside as well. I want to make it flexable
> though so it can handle other types such as <em> etc.
>
> On Oct 26, 6:26 pm, MorningZ <morni...@gmail.com> wrote:
>
>
>
> > Perhaps post an example of the <table>'s HTML and it would (much)
> > easier to help.... as your first post mentioned <a> tags and you
> > implied it was nothing but those, now you have <em> or no tag at all,
> > quite a bit more complicated now
>
> > On Oct 26, 4:45 pm, ChaosAD <chao...@gmail.com> wrote:
>
> > > Thanks for the reply. My problem is rising from the fact that not all
> > > column are url based. Some are straight data and some others might
> > > have other tags such as <em> around them. I tried following the
> > > example for custom parser and I kept getting s integer errors. Sorry
> > > if this is simple problem, I am very nice to jquery and especially
> > > tablesort.
>
> > > On Oct 26, 4:36 pm, MorningZ <morni...@gmail.com> wrote:
>
> > > > You'll need to write a custom Parser so that you get what's inside the
> > > > <a> tag and not the string itself...
>
> > > > It's very easy to do if you just follow his example on the site
>
> > > > On Oct 26, 3:00 pm, ChaosAD <chao...@gmail.com> wrote:
>
> > > > > I'm fairly new to Tablesort, but got it working for the most part. The
> > > > > only problem I have is any columns that have a <a href></a> in them.
> > > > > It seems to sort it based on the url and not that actual data in the
> > > > > cell. How do I get it to sort based on the data and not the url?

Reply via email to