Monday, December 28, 2009

Re: [jQuery] how to get current sort order from tablesorter plugin?

Thanks!

Someone on StackOverflow pointed out that current sort order is indicated by
the class applied to the column. So, I can test for the class
('headerSortUp', 'headerSortDown') on the Category column, and then trigger
a sort in the opposite direction. I think I'll do that rather then go after
an internal data structure that's not officially exposed thru an API. Thanks
for the info, tho!

- Val


aquaone wrote:
>
> I believe tablesorter's internal sort is stored under "config.sortList"
> for
> the table DOM element. It's a multidimensional array of column indices and
> sort direction, e.g. [[2,0][0,1]].
>
> aquaone
>
>

--
View this message in context: http://old.nabble.com/how-to-get-current-sort-order-from-tablesorter-plugin--tp26908861s27240p26945440.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.

No comments: