You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Plugins/sorting/custom-data-source/dom-text.js

16 lines
470 B
JavaScript

/**
* Read information from a column of input (type text) elements and return an
* array to use as a basis for sorting.
* @name Input element data source
* @author <a href="http://sprymedia.co.uk">Allan Jardine</a>
*/
$.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;
};