I'm using the DataTables Table plug-in for jQuery but I'm having trouble
getting the global input search box would be an select box.
With the sDOM option lrtip
, filtering input is not show but is
it possible to display select box and getting the datatable to filter based on the change of the select box?
JS:
$(document).ready(function() {
var table = $('#table_page').DataTable( {
paging: true,
ordering: false,
info: true,
searching: true,
sDom: "lrtip" // default is lfrtip, where the f is the filter
});
});
HTML:
<table id="table_page" class="display cell-border" width="100%">
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
</tr>
</thead>
</table>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…