jQuery plugin enable you to use HTML5 data-* attributes to simplified DataTables initialization and configuration. It also generate additional header with various types of search fields.
Deprecated and abondoned in favor of imTigger/DataTables-SearchHeader
-
If
data-datatable-ajax-load-url
is set, it will be mapped todataTable.ajax.url
.dataTable.ajax.processing
& ``dataTable.ajax.serverSideis set to
true` automagically. -
If
data-datatable-ajax-order-url
is set,row-reorder.dt
event will be listened Once triggered, creating ajax request to that url.dataTable.rowReorder
is set to true,dataTable.paging
is set tofalse
data-datatable-id
is mapped tocolumns.data
data-datatable-name
is mapped tocolumns.name
data-datatable-searchable
is mapped tocolumns.searchable
data-datatable-sortable
is mapped tocolumns.sortable
data-datatable-class
is mapped tocolumns.className
datatable-search-type
can beselect|date|date-range|custom
,-
select
requiresdatatable-search-custom
and will generate <select> in header cell
-
date
generates one <input> with classdatepicker
-
date-range
generates two <input> with classdatepicker datatable-filter
❗
-
custom
requiresdatatable-search-custom
and will place that HTML in header cell
datatable-search-options
requires JSON string with format {key: value, key2: value2, ...}datatable-search-custom
requires HTML- ❗ <input> with class datatable-filter will be submitted as additional GET parameter in each HTTP request. Server MUST handle it manually for them to take effect
<table class="table table-striped table-bordered table-hover" id="dataTables" data-datatable-ajax-load-url="http://domain.com/">
<thead>
<tr>
<th data-datatable-id="id" data-datatable-name="order.id">ID</th>
<th data-datatable-id="order_number" data-datatable-name="order.order_number">Order Number</th>
<th data-datatable-id="parcel_value" data-datatable-name="parcel.value" data-datatable-searchable="false">Parcel Value</th>
<th data-datatable-id="actions" data-datatable-searchable="false" data-datatable-sortable="false" data-datatable-class="dt-center">Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
Reference: https://datatables.net/reference/option/