Couldn't find a tutorial in the Docs.
Trying to implement a custom comparator function in from
sortable_table.js
function compareNatural(a, b) {
return a - b
}
This function returns the correct order for an array with mixed
alphanumerics:
original: 4,68,3,81,13,152,15,58a,aasd30
string sort: 11,150,3,39,58a,aasd30,aasd55
num sort: "58a" cast to float becomes "NaN" and no longer possible
to compare it with items in array
using compareNatural(): 3,11,39,58a,150,aasd30,aasd55
How do I implement this function in sortable_tables.js (from the demo)?
Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---