Using jQuery TableSorter to Sort Columns Containing Drop-down (SELECT) Tags and Dollar Signs ($)

I am using the fabulous jQuery TableSorter plugin to automatically add sorting functionality to the columns of a table (simply by clicking on each column's header). This works flawlessly for all columns except a couple of them.

1) One of the column's cells contain dollar signs in the front (such as: $20, $10, $5). The sorting does not work properly; it sorts alphabetically (and since all cell contents start with a $, they all get incorrectly bundled together). What code would force the sorter to start from the second character, thus ignoring the dollar signs?

2) Another column has dynamic drop-downs (1 SELECT tag in each cell), and I would like it to alphabetically sort the column by the currently selected values inside each SELECT tag. Any ideas?

If you can at least point me to the right direction and give me an idea about how to customize the sorting in each of the two scenarios, I would greatly appreciate it.

Thanks in advance!!

6
задан DecafJava 5 May 2011 в 22:06
поделиться