Reputation: 309
As you can see in this example jQuery DataTables has a search box function.
I want to create customized search box design. Is it possible to create your own using the code below outside the DataTables?
<input type="text" id="search" name="search">
Upvotes: 1
Views: 123
Reputation: 58880
Please see Search API example and how Global search is implemented.
For example, you can use the code below where search
is ID of your search box:
$(document).ready(function() {
$('#example').DataTable();
$('#search').on( 'keyup click', function () {
$('#example').DataTable().search(
$('#search').val()
).draw();
} );
} );
Upvotes: 1