DataTables разместить поиск и фильтр записей под таблицей? - PullRequest
3 голосов
/ 02 декабря 2011

Можно ли разместить фильтр Показать цели в фильтре поиска под таблицей, а не над таблицей?

См .: http://datatables.net/release-datatables/examples/basic_init/alt_pagination.html

И я знаю, что могу поставить позицию een: абсолют и прочее, но мне нужен HTML-код этих вещей под таблицей.

Ответы [ 2 ]

7 голосов
/ 02 декабря 2011

Нашли решение:

"sDom": 't<plf>'

This initialisation variable allows you to specify exactly where in the DOM you want DataTables to inject the various controls it adds to the page (for example you might want the pagination controls at the top of the table). DIV elements (with or without a custom class) can also be added to aid styling. The follow syntax is used:
The following options are allowed:

'l' - Length changing
'f' - Filtering input
't' - The table!
'i' - Information
'p' - Pagination
'r' - pRocessing
The following constants are allowed:
'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')
'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')
The following syntax is expected:
'<' and '>' - div elements
'<"class" and '>' - div with a class
'<"#id" and '>' - div with an ID
Examples:
'<"wrapper"flipt>', '<lf<t>ip>'
1 голос
/ 05 января 2017

Поместите свой Div где угодно

$('div.dataTables_filter').appendTo("#filterdata");

<div id="filterdata">

</div>
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...