LeMoussel LeMoussel - 8 months ago 70
jQuery Question

How to use Select box outside to filter dataTables?

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

, 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?


$(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


<table id="table_page" class="display cell-border" width="100%">
<th>Column 1</th>
<th>Column 2</th>


You can use search() API method to perform global search programmatically and dom option to disable built-in search control.

For example:

var table = $('#example').DataTable({
   dom: 'lrtip'

$('#table-filter').on('change', function(){

See this example for code and demonstration. See this example, if you want to replace default search box.