1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-12-01 13:24:10 +01:00
DataTables/examples_src/basic_init/dom.xml
2013-03-11 16:32:28 +00:00

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>&lt;</b> and <b>&gt;</b> - div elements</li>
<li><b>&lt;"class"</b> and <b>&gt;</b> - div with a class</li>
<li>Examples: <b>&lt;"wrapper"flipt&gt;</b>, <b>&lt;lf&lt;t&gt;ip&gt;</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>