Get the orthogonal value of 'data-sort' from DataTables in search.push function

I loop the lines in the function $.fn.dataTable.ext.search.pushto select some lines based on many criteria. I set some values ​​in TDtables known as orthogonal . I am trying to get the value , but I do not know how to do it. I can get the internal cell data through (for column 2), but not “data sorting” or “data filter”. Any ideas? 'data-sort'data[2]

$.fn.dataTable.ext.search.push(
    function (settings, data, dataIndex) {

        var iRating = parseFloat(data[2]) || 0; // this works 
        var datasort = //somehow get the data-sort from the TD
);

HTML

<td data-sort="57000" class=" seqNum">.....</td>
0
source share
1 answer

It looks like I can get the value. If there are other better ways, please advice:

$(settings.aoData[dataIndex].anCells[2]).data('sort')
+1
source

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


All Articles