mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-01 13:24:10 +01:00
34 lines
1.5 KiB
XML
34 lines
1.5 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<dt-example table-type="html">
|
|
|
|
<css lib="datatables" />
|
|
<js lib="jquery" />
|
|
<js lib="datatables" />
|
|
|
|
<title>DOM positioning</title>
|
|
<js><![CDATA[
|
|
$(document).ready(function() {
|
|
$('#example').dataTable( {
|
|
"dom": '<"top"i>rt<"bottom"flp><"clear">'
|
|
} );
|
|
} );
|
|
]]></js>
|
|
|
|
<info>
|
|
<p>When customising DataTables for your own usage, you might find that the default position of the feature elements (filter input etc) is not quite to your liking. To address this issue DataTables takes inspiration from the CSS 3 Advanced Layout Module and provides the <init>dom</init> initialisation parameter which can be set to indicate where you which particular features to appear in the DOM. You can also specify <code>div</code> wrapping containers (with classes) to provide complete layout flexibility. The syntax available is:</p>
|
|
<ul>
|
|
<li><b>l</b> - Length changing</li>
|
|
<li><b>f</b> - Filtering input</li>
|
|
<li><b>t</b> - The table!</li>
|
|
<li><b>i</b> - Information</li>
|
|
<li><b>p</b> - Pagination</li>
|
|
<li><b>r</b> - pRocessing</li>
|
|
<li><b><</b> and <b>></b> - div elements</li>
|
|
<li><b><"class"</b> and <b>></b> - div with a class</li>
|
|
<li>Examples: <b><"wrapper"flipt></b>, <b><lf<t>ip></b></li>
|
|
</ul>
|
|
<p>In the example below I've moved the table information to the top of the table, and all the interaction elements to the bottom, each wrapper in a container <code>div</code>.</p>
|
|
</info>
|
|
|
|
</dt-example>
|