Hello,
I am happily using datatables and I added filters which work well:
//filtering function
$.fn.dataTable.ext.search.push(
function( settings, data, dataIndex )
{
//Price range
var price_min = $('#price_min').val() * 1;
var price_max = $('#price_max').val() * 1;
var price = parseFloat( data[7] ) || 0; // price column
if ( ( price_min != '' && price < price_min ) || ( price_max != '' && price > price_max ) )
return false;
return true;
}
);
=> I would like to improve the code by accessing data by column name ( e.g. : data['prix'] ) rather than index number ( data[7] )
Thank you in advance for your help !