I am using jQuery DataTables library to display simple markup of an HTML table, i.e. without using Ajax or JSON. Everything works well, except that I have several columns where I would like to sort the raw data, rather than the formatted data that is displayed. I would like to add an attribute to my TD tags, for example "data-sort =" 42 "and initialize the DataTables, indicating that it will sort the column based on this value, if present.
I read the documentation for mData and mRender, but they seem to handle a much more complicated situation than mine, i.e. where data is subject to change or selection from the server on demand.
Please, can someone tell me how the initialization code goes, or give me an example that does this? Thank you very much!
Bean
source share