FixedColumns, the fixed columnheaders still able to scroll when scroll horizontally

FixedColumns, the fixed columnheaders still able to scroll when scroll horizontally

bittersourbittersour Posts: 6Questions: 3Answers: 0
edited May 2014 in Free community support

Hi,

I am using FixedColumns 3.0.1. It works ok on Chrome. But not on Firefox and IE. I have 2 fixed columns. When I scroll horizontally, the 2 columnheaders which is fixed can still be scrolled.

th, td { white-space: nowrap; }
        .dataTables_wrapper_auto {
            margin: 0 auto;
        }
        .dataTables_wrapper_fixed {
            margin: 0 auto;
            width: 1120px;
        }
        var jq = $.noConflict();
        jq(document).ready(function() {
            var single = document.getElementById('opf1007_datatable_forecast');
            
            if(single != null){
                var s_col_count = document.getElementById('opf1007_datatable_forecast').rows[0].cells.length;
                
                if(s_col_count == 1 || s_col_count == 2 || s_col_count == 3 || s_col_count == 4 
                    || s_col_count == 5 || s_col_count == 6 || s_col_count == 7){
                    
                    document.getElementById('opf1007_div_forecast').setAttribute("class","dataTables_wrapper_auto");
                    jq('#opf1007_datatable_forecast').DataTable( {
                        scrollY:        "400px",
                        scrollX:        true,
                        scrollCollapse: true,
                        paging:         false,
                        dom:            "ltpr",
                        bSort:          false
                    } );
                }else{
                    document.getElementById('opf1007_div_forecast').setAttribute("class","dataTables_wrapper_fixed");
                    var single = jq('#opf1007_datatable_forecast').DataTable( {
                        scrollY:        "400px",
                        scrollX:        true,
                        scrollCollapse: true,
                        paging:         false,
                        dom:            "ltpr",
                        bSort:          false
                    } );
                   
                    new jq.fn.dataTable.FixedColumns( single, {
                        leftColumns: 2
                    } );
                }
            }  
        } );

This discussion has been closed.