Tablesorter configuration headers

Is there a way to configure tablesorter headers with identifiers or classes instead of column number?

So instead:

headers:
          { 0: { sorter: 'digit' } ,
        1: { sorter: false  } 
}

I would like to do it as follows:

'some class or id': { sorter: 'digit' } ,
'some class or id': { sorter: false  } 

And the same for sorting

[[0,0],[1,0]] => would be [['some class',0],['some id',0]]
+3
source share
2 answers

I could not find a way to do just that (it would be ideal for what I needed if I could), but it worked for me - http://tablesorter.com/docs/example-meta-headers.html

Please note that the demo on this page does not actually work, but when I also included the MetaData plugin (jquery.metadata.js - included in the download) and added it class="{sorter: false}"to the title in which it worked.

+1
source
-1

Source: https://habr.com/ru/post/1793936/


All Articles