what does it take to put the search box, searching the table columsn just like in all of your demos?
what does it take to put the search box, searching the table columsn just like in all of your demos?
halukkaramete
Posts: 2Questions: 1Answers: 0
Link to test case:
When I copy paste the following code, all I get is the table. No search box there. What am I missing?
<!--add-data-table--1 (libraries)-->
<script src='https://code.jquery.com/jquery-3.7.0.js'></script>
<script src='https://cdn.datatables.net/1.13.7/js/jquery.dataTables.min.js'></script>
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/1.13.7/css/jquery.dataTables.min.css">
<!--add-data-table--2 (html)-->
<table id="example" class="display" style="width:100%">
<thead>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</thead>
<tbody>
<tr>
<td>Tiger Nixon</td>
<td>System Architect</td>
<td>Edinburgh</td>
<td>61</td>
<td>2011-04-25</td>
<td>$320,800</td>
</tr>
<tr>
<td>Haluk Tiger Nixon</td>
<td>System Mujgan Architect</td>
<td>Edinburgh Gulsum</td>
<td>99</td>
<td>2011-04-25</td>
<td>$320,800</td>
</tr>
</tbody>
<tfoot>
<tr>
<th>Name</th>
<th>Position</th>
<th>Office</th>
<th>Age</th>
<th>Start date</th>
<th>Salary</th>
</tr>
</tfoot>
</table>
<!--add-data-table--3 (init)-->
<script>
new DataTable('#example', {
info: false,
ordering: false,
paging: false
});
</script>
Debugger code (debug.datatables.net):
Error messages shown:
No search box.
Description of problem:
Went thru the apis and manual but could not spot search: show/hide type of a feature or anything close to it.
Answers
Figured it, sorry!
...
paging: false,
searching: true
});
does it!
searching
is enabled by default. I tried your original code verbatim and it seems to work: https://live.datatables.net/pevusoja/1/edit .Allan