Show search box only
Show search box only
spidogr
Posts: 23Questions: 9Answers: 0
Probably this has been asked before, but I cannot find an answer.
Is it possible for the table to be hidden and appear only after the user starts typing in the search box?
This is for a server side approach (mysql), so ideally, no request should be send to the server when the table initializes.
Answers
Hi,
You can't use the search box that DataTables creates for that, but you can readily use your own search box to search DataTables through the
search()
method. Here is a little example: http://live.datatables.net/keteqiyo/1/edit .Allan
$(document).ready(function() {
$('#your_tableID').DataTable( {
} );
May that could help you out. only that it keeps the pagination
ok!!! this then worked fine for me.
disable pagination by doing this