Reputation: 21
I am trying to implement datatable fixed colum example coping from there side inside my code but it simply dopesn't work. I created a jsfiddle with the same code but columns are not fixed.
site: https://datatables.net/extensions/fixedcolumns/examples/initialisation/two_columns.html
JS sample: http://jsfiddle.net/jsf6cg6L/229/
var table = $('#example').DataTable( {
scrollY: "300px",
scrollX: true,
scrollCollapse: true,
paging: false,
fixedColumns: {
leftColumns: 1,
rightColumns: 1
}
} );
Upvotes: 0
Views: 2571
Reputation: 6923
Your fiddle is missing a dependency:
https://cdn.datatables.net/fixedcolumns/3.2.2/js/dataTables.fixedColumns.min.js
Adding it as an external resource makes it work.
Upvotes: 2