Code: Select all
$.fn.dataTable.ext.type.detect.unshift(function (d) {
return d === 'one' || d === 'two' || d === 'three' ? 'status-grade' : null;
});
// ---- datatables
$(document).ready(function() {
/* sort on status */
$.fn.dataTable.ext.type.order['status-grade-pre'] = function (d) {
switch (d) {
case 'one':
return 1;
case 'two':
return 2;
case 'three':
return 3;
}
return 0;
};
});
Code: Select all
$(document).ready(function() {
$.fn.dataTable.ext.type.order['status-grade-pre'] = function (d) {
Code: Select all
$.fn.dataTable.ext.type.detect.unshift(function (d) {
Code: Select all
$.fn.dataTable.ext.type.detect.unshift(function(d) {