ndividual column searching not working
ndividual column searching not working
Hello,
i'am trying this : https://datatables.net/examples/api/multi_filter_select.html i just copied pasted the JS, and i have this on firebug :
TypeError: this.api(...).columns(...).every is not a function
...URL...
$(document).ready(function() {
$('#example').DataTable( {
initComplete: function () {
this.api().columns().every( function () {
var column = this;
var select = $('<select><option value=""></option></select>')
.appendTo( $(column.footer()).empty() )
.on( 'change', function () {
var val = $.fn.dataTable.util.escapeRegex(
$(this).val()
);
column
.search( val ? '^'+val+'$' : '', true, false )
.draw();
} );
column.data().unique().sort().each( function ( d, j ) {
select.append( '<option value="'+d+'">'+d+'</option>' )
} );
} );
}
} );
} );