Using FixedColumns on Multiple Tables within a Page

Using FixedColumns on Multiple Tables within a Page

dickbobdickbob Posts: 10Questions: 0Answers: 0
edited September 2012 in General
I have several tables (10+) on my page that I would like to format with FixedColumns but can't seem to target them with a class. Only individual id's seem to work like so...

[code]
$.extend($.fn.dataTable.defaults, {
"sScrollX": "50%",
"sScrollXInner": "200%",
"bScrollCollapse": false,
"bPaginate": false,
"bSort": false,
"bInfo": false,
"bFilter": false,
"bAutoWidth": false
});

var oTable1 = $('#fixedColumnTest1').dataTable();

new FixedColumns( oTable1, {
"iLeftColumns": 2
,"iLeftWidth": 250
});

var oTable2 = $('#fixedColumnTest2').dataTable();

new FixedColumns( oTable2, {
"iLeftColumns": 2
,"iLeftWidth": 250
});
[/code]

Can anyone suggest a more efficient method?

Regards,

Richard
This discussion has been closed.