I am using datatables and in one column the cells "td" elements have the following html within.
I have a custom drop down in the table header with two buttons. Each button's click event is linked to this column and the associate data attributes. On click I would like the column to be sorted by either data-pos or data-second depending on the button clicked.
So you will need to write a function to get the data attributes and either re order the table or sort the table by these values.
Sorting on click will toggle between ASC and DESC for the data attribute.