My code looks like this:
$.extend($.fn.dataTableExt.afnSortData, {
'dom-text': function (oSettings, iColumn) {
var aData = [];
$('td:eq(' + iColumn + ') input', oSettings.oApi._fnGetTrNodes(oSettings)).each(function () {
aData.push(this.value);
});
return aData;
},
'dom-data-rk': function (oSettings, iColumn) {
var aData = [];
$('td:eq(' + iColumn + ')', oSettings.oApi._fnGetTrNodes(oSettings)).each(function () {
aData.push($(this).attr('data-rk'));
});
return aData;
}
});
I used JSLint and it came up with an error:
Warning 21 JS Lint: Unexpected dangling '_' in '_fnGetTrNodes'.
Can someone explain what this means? I don’t understand the error message at all 🙁
JSLint simply doesn’t like identifiers to begin with an underscore character. Change the identifier and the warning will go away, or add the following directive to the top of the file:
The reason it doesn’t like them is that people often use it to indicate a “private” variable, but doesn’t actually change the behaviour of the variable.