Individual column searching (select inputs) with Ajax
Individual column searching (select inputs) with Ajax
pvtpepper
Posts: 4Questions: 2Answers: 0
Trying to get this code:
<script>
jQuery(function(){
jQuery('#datatable').dataTable({
"ajax": "/sites/sample.json",
"columns": [
{ "data": "region" },
{ "data": "state" },
{ "data": "siteId" },
{ "data": "siteName" },
],
"lengthMenu": [[10, 25, 100, -1], [10, 25, 100, "All"]]
} );
} );
</script>
To work with this:
https://datatables.net/examples/api/multi_filter_select.html
but getting stuck on where to insert it.
Thanks!
This discussion has been closed.
Answers
You would insert the "ajax", "columns", and "lengthMenu" options (everything in "" or [] after those options) right before initComplete
Like this?