[jQuery] Re: Tablesorter: what am I doing wrong?

2007-05-17 Thread Daemach

I don't know tablesorter, but here is another potential option - it's
not very configurable right now, but some interesting things are
coming soon.  I'm just trying to work out some performance issues in *
%#%$!%$ Internet Explorer.

http://ideamill.synaptrixgroup.com/?p=7

On May 17, 7:33 am, Sarcastic Zombie [EMAIL PROTECTED]
wrote:
 Good morning!

 I'm trying to use tablesorter on a dynamically generated table. Most
 of the columns sort fine. However, I'm having issues with the number
 columns.

 One of the columns is called Account Number and it's a series of
 integers. When sorted, I get this sort of effect:

 Acct #
 
 809
 808
 8079
 807
 806

 Which seems to me like it's sorting the numbers as if they were
 strings and not integers.

 Another column is a series of floats representing owed balances on the
 accounts. Again, it seems to be sorting as if we're dealing with
 strings.

 Amount
 ---
 -57.60
 -61.00
 -667.98
 -7.10
 -93.46
 0.07
 0.08
 0.26
 0.78

 I'm invoking the tablesorter as follows:

 script type=text/javascript
 $(document).ready( function() {
 $('#openaccounts').tableSorter({
 stripingRowClass: ['', 'alt'],
 stripeRowsOnStartUp: true,
 });
 });
 /script

 Any tablesorting gurus out there that can help me figure out what I'm
 doing wrong?



[jQuery] Re: Tablesorter: what am I doing wrong?

2007-05-17 Thread Sarcastic Zombie

 I'm trying to use tablesorter on a dynamically generated table. Most
 of the columns sort fine. However, I'm having issues with the number
 columns...

Victory! I figured out the problem.

I have a tendency to structure my tables like this:

table
tr
   td
   data!
   td
   /tr
/table

The reason tablesorter wasn't seeing my number column as a number
column was the whitespace between td, my data, and /td. Once I
closed up the td lines to being one line, it recognized the numbers as
numbers and is now sorting appropriately.

Just wanted to let everyone know, in case they hit the same gotcha.
Sorter is working great now!

-SZ



[jQuery] Re: Tablesorter: what am I doing wrong?

2007-05-17 Thread Sarcastic Zombie

On May 17, 3:20 pm, Daemach [EMAIL PROTECTED] wrote:
 I don't know tablesorter, but here is another potential option - it's
 not very configurable right now, but some interesting things are
 coming soon.  I'm just trying to work out some performance issues in *
 %#%$!%$ Internet Explorer.


Thanks for the link, I'll check it out. :)