Skip to content

Commit 802cd4e

Browse files
committed
Fix example: FixedColumns integration example had a JS error
1 parent 7fa72d5 commit 802cd4e

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

examples/fixedcolumns.xml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
2-
<dt-example table-type="html-wide" order="10">
2+
<dt-example table-type="html-wide" table-class="display no-wrap" order="10">
33

44
<css lib="datatables colreorder fixedcolumns" />
55
<js lib="jquery datatables colreorder fixedcolumns">
66
<![CDATA[
77
88
$(document).ready(function() {
9-
var table = $('#example').dataTable( {
9+
window.table = $('#example').DataTable( {
1010
dom: 'Rlfrtip',
1111
scrollX: true,
1212
scrollCollapse: true,
@@ -21,17 +21,7 @@ $(document).ready(function() {
2121
}
2222
} );
2323
24-
// Show an index column at the start and end of the table
25-
table.on( 'order.dt search.dt', function () {
26-
table
27-
.column([0,-1], {search:'applied', order:'applied'})
28-
.nodes()
29-
.each( function (cell, i) {
30-
cell.innerHTML = i+1;
31-
} );
32-
} ).draw();
33-
34-
new $.fn.dataTable.fixedColumns( table, {
24+
window.fc = new $.fn.dataTable.FixedColumns( table, {
3525
leftColumns: 1,
3626
rightColumns: 1
3727
} );

0 commit comments

Comments
 (0)