FixedColumns: setting IDs of left and right tables
FixedColumns: setting IDs of left and right tables
deathtospam
Posts: 10Questions: 0Answers: 0
How would I set the IDs of each of the six HTML tables that are present after FixedColumns is called? Here is what I was trying to do via jQuery:
[code]
$(document).ready(function () {
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.DTFC_LeftWrapper:eq(0) div.DTFC_LeftHeadWrapper:eq(0) table:eq(0)").prop("id", "MyDatatableLeftHeaderTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.DTFC_LeftWrapper:eq(0) div.DTFC_LeftBodyWrapper:eq(0) table:eq(0)").prop("id", "MyDatatableLeftBodyTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.DTFC_LeftWrapper:eq(0) div.DTFC_LeftFootWrapper:eq(0) table:eq(0)").prop("id", "MyDatatableLeftFooterTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.dataTables_scroll:eq(0) div.dataTables_scrollHead:eq(0) table:eq(0)").prop("id", "MyDatatableRightHeaderTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.dataTables_scroll:eq(0) div.dataTables_scrollBody:eq(0) table:eq(0)").prop("id", "MyDatatableRightBodyTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.dataTables_scroll:eq(0) div.dataTables_scrollFoot:eq(0) table:eq(0)").prop("id", "MyDatatableRightFooterTable");
});
[/code]
It works in Firefox, but fails in IE8 -- it seems like it can't see any of the DTFC classes, for some reason.
I imagine there's a better way to do what I'm doing... help?
[code]
$(document).ready(function () {
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.DTFC_LeftWrapper:eq(0) div.DTFC_LeftHeadWrapper:eq(0) table:eq(0)").prop("id", "MyDatatableLeftHeaderTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.DTFC_LeftWrapper:eq(0) div.DTFC_LeftBodyWrapper:eq(0) table:eq(0)").prop("id", "MyDatatableLeftBodyTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.DTFC_LeftWrapper:eq(0) div.DTFC_LeftFootWrapper:eq(0) table:eq(0)").prop("id", "MyDatatableLeftFooterTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.dataTables_scroll:eq(0) div.dataTables_scrollHead:eq(0) table:eq(0)").prop("id", "MyDatatableRightHeaderTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.dataTables_scroll:eq(0) div.dataTables_scrollBody:eq(0) table:eq(0)").prop("id", "MyDatatableRightBodyTable");
$("#MyDatatable_wrapper div.DTFC_ScrollWrapper div.dataTables_scroll:eq(0) div.dataTables_scrollFoot:eq(0) table:eq(0)").prop("id", "MyDatatableRightFooterTable");
});
[/code]
It works in Firefox, but fails in IE8 -- it seems like it can't see any of the DTFC classes, for some reason.
I imagine there's a better way to do what I'm doing... help?
This discussion has been closed.