'How to simple put button value to jQuery Datatables search input?
I cannot simple create buttons for put value to jQuery datatable search input, because cannot find the input ID name! I using "jquery-1.11.3.min.js" & "jquery.dataTables.min.js (v1.10.23)", help me, please!
Solution 1:[1]
You don't have to target the search input directly. You should instead use datatable's .search() api. Example
var table = $('#table-id').DataTable();
$('button').click(function(){
table.search( $(this).text() ).draw();
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ruleboy21 |
