Use 'Ignore text plugin' to display text at top of table instead of bottom

Use 'Ignore text plugin' to display text at top of table instead of bottom

Adam84Adam84 Posts: 10Questions: 4Answers: 0

Hi, I've being using the 'Ignore text plugin' recently which has proved really effective.

http://www.datatables.net/forums/discussion/22343/new-sorting-plugin-sort-by-any-number-ignore-text.

Is it possible to adjust the sorting so that text is displayed at the top of the table rather than the bottom?

I've put a fiddle together as an example...

http://jsfiddle.net/Adam84/vh3vn6nu/5/

Any help is really appreciated!

Replies

  • ignignoktignignokt Posts: 146Questions: 4Answers: 39

    http://jsfiddle.net/vh3vn6nu/6/

    :)

    You aren't using the ignore comma solution anymore, according to that fiddle? The numbers no longer sort correctly because of that.

  • Adam84Adam84 Posts: 10Questions: 4Answers: 0

    Thanks Ignignokt,

    I have actually being using the comma solution, it's been really effective. I used a previous set of code just for the example. Thanks again!

    I've swapped the POSITIVE_INFINITY and NEGATIVE_INFINITY around on the comma solution and it work perfectly. Strings display at the top of table rather than bottom.

    I've edited my fiddle...

    http://jsfiddle.net/Adam84/vh3vn6nu/7/

    Thanks for your help!

This discussion has been closed.