mirror of
https://github.com/DataTables/DataTables.git
synced 2024-12-01 13:24:10 +01:00
25 lines
1.2 KiB
XML
25 lines
1.2 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<dt-example table-type="html">
|
|
|
|
<css lib="datatables" />
|
|
<js lib="jquery" />
|
|
<js lib="datatables" />
|
|
|
|
<title></title>
|
|
<js><![CDATA[
|
|
$(document).ready(function() {
|
|
$('#example').dataTable( {
|
|
"scrollX": "100%",
|
|
"scrollXInner": "110%",
|
|
"scrollCollapse": true
|
|
} );
|
|
} );
|
|
]]></js>
|
|
|
|
<info>
|
|
<p>This DataTables horizontal scrolling example shows horizontal scrolling on a DataTable, which is very useful for when you have a wide table, with a large number of columns to display, but want to constrain it to a limited horizontal display area. To enable x-scrolling simply set the <init>scrollX</init> parameter to be whatever you want the container wrapper's width to be (any CSS measurement is acceptable, or just a number which is treated as pixels). Note also that sScrollXInner is used here to force the table to be wider than is strictly needed. You may or may not want to include this parameter depending on your application.</p>
|
|
<p>Also shown in this example is the use of a 'collapsing scroll table' by using <init>scrollCollapse</init>. When this parameter is set to true, the table size will 'collapse' down to match the number of rows, if the table height is smaller than the scrollable area.</p>
|
|
</info>
|
|
|
|
</dt-example>
|