Individual column searching (select inputs)
Individual column searching (select inputs)

I am trying the example: https://datatables.net/examples/api/multi_filter_select.html
Individual column searching (select inputs)
on mine:
$(document).ready(function() {
$('#example').DataTable( {
"sScrollX": "100%",
"sScrollXInner": "100%",
"bScrollCollapse": true,
"sPaginationType": "full_numbers",
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>' )
} );
} );
$('#example tfoot tr').insertBefore($('#example thead tr'))
}
but it is not working
I have tried on https://jsfiddle.net/bigwelly/xpndms1a/8/
This discussion has been closed.
Answers
I think the extra <thead> is throwing it off. Check out https://github.com/vedmack/yadcf