Add support for data-sort attribute #17

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
2 participants
Collaborator

xPaw commented Dec 23, 2012

By adding data-sort="somecontent" to <td> element, it will be checked first, before getting contents of the element. Great for sorting numbers.

Owner

tristen commented Dec 25, 2012

Interesting. I'll review this soon!

Collaborator

xPaw commented Jan 7, 2013

Just wanted to say that I've been using this method across different tables, and it's working nicely

Owner

tristen commented Jan 8, 2013

@xPaw this looks cool. Can you make your changes to src/tablesort.js and rebuild the lib using grunt ?

Also if you could update readme.md under Additional Options with this? Additionally, there is a contributors array you should add your name to.

Collaborator

xPaw commented Jan 8, 2013

Is there any reason why there are 2 copies of the source?

Owner

tristen commented Jan 8, 2013

@xPaw there's only one source file and it exists in the src/ directory. I guess I could have called tablesort.js in the root tablesort.uncompressed.js

The one primary advantage to structuring your code in this was is that you can split up your spec into separate scripts within this src directory.

Collaborator

xPaw commented Jan 8, 2013

Ah, okay. I will do the changes to src file soon. I probably won't be able to compile with grunt (never used it, don't have too much time right now).

@xPaw xPaw closed this Jan 8, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment