I am using the DataTables jquery library to display simple HTML table markup, i.e. not using Ajax or JSON. It is all working nicely except that I have some columns where I would like to sort on the raw data, not on the formatted data that is displayed. I would like to add an attribute to my TD tags, such as 'data-sort="42"' and initialize DataTables, instructing it to sort the column based on this value, where present.
I have read the documentation for mData and mRender, but these seem to be handling a much more complex situation than my own, i.e. where the data is prone to being changed or fetched from the server on demand.
Please could someone spell out for me how the initialization code goes, or point me to an example that does so? Many thanks!
Bob