Skip to content

Commit

Permalink
New example: ColReorder with Responsive example
Browse files Browse the repository at this point in the history
  • Loading branch information
Allan Jardine committed Feb 10, 2016
1 parent 586bd91 commit 72d502d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
30 changes: 30 additions & 0 deletions examples/integration/responsive.xml
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html-wide" order="4" table-class="display nowrap">

<css lib="datatables colreorder responsive" />
<js lib="jquery datatables colreorder responsive">
<![CDATA[
$(document).ready(function() {
var table = $('#example').dataTable( {
colReorder: true,
responsive: true,
columnDefs: [ {
targets: 2,
responsivePriority: 10001
} ]
} );
} );
]]>
</js>

<title lib="ColReorder">Responsive integration</title>

<info><![CDATA[
This example shows ColReorder being used with the [Responsive extension for DataTables](https://datatables.net/extensions/colreorder). The _"Position"_ column is the first to be hidden through the use of the `r-init columns.responsivePriority` option, and you'll be able to notice that the hidden column is automatically taken account of by ColReorder as the columns are reordered.
]]></info>

</dt-example>
2 changes: 1 addition & 1 deletion examples/integration/server_side.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="ssp" order="4">
<dt-example table-type="ssp" order="5">

<css lib="datatables colreorder" />
<js lib="jquery datatables colreorder">
Expand Down
2 changes: 1 addition & 1 deletion examples/integration/state_save.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html" order="5">
<dt-example table-type="html" order="6">

<css lib="datatables colreorder" />
<js lib="jquery datatables colreorder">
Expand Down

0 comments on commit 72d502d

Please sign in to comment.