got a bug in chrome and safria,about the th and the td

got a bug in chrome and safria,about the th and the td

sielsiel Posts: 5Questions: 0Answers: 0
edited June 2010 in General
Hi allan:
I got an strange problem about the vertical alignment,this problem only happened in chrome and safria.

I hide some column to keep the information for the details when you click the '+' button,then ,this problem come out and it's strange, you can check the picture in below link.

for the picture 1,it's work well ,but if you chick the chrome's refresh button(button2 on the picture),the vertical alignment will not in one line(picture 2),but if you reload this page(click button1),everything goes okay,so strange.

I worked on this for two days but make no progress,so I have to ask help.hope you can help me.

sorry for my poor English,I'm Chinese :)

and thank for the amazing table tool,it's very good!

check this link http://www.fohome.com/BBS/thread-769-1-1.html

Replies

  • sielsiel Posts: 5Questions: 0Answers: 0
    oh,here is my code
    [code]

    function fnFormatDetails ( oTable, nTr ){
    var aData = oTable.fnGetData( nTr );
    var sOut = '';
    sOut += '';
    sOut += '??:'+ aData[9] +'
    ';
    sOut += '??:'+ aData[10] +'
    ';
    sOut += '??:'+ aData[11] +'
    ';
    sOut += '??:'+ aData[12] +'
    ';
    sOut += '??:'+ aData[13] +'
    ';
    sOut += '??:'+ aData[14] +'
    ';
    sOut += '??:'+ aData[15] +'
    ';
    sOut += '';
    return sOut;
    }

    $(document).ready(function() {
    var nCloneTh = document.createElement( 'th' );
    var nCloneTd = document.createElement( 'td' );
    nCloneTd.innerHTML = '';
    nCloneTd.className = "center";

    $('#example thead tr').each( function () {
    this.insertBefore( nCloneTh, this.childNodes[0] );
    } );

    $('#example tbody tr').each( function () {
    this.insertBefore( nCloneTd.cloneNode( true ), this.childNodes[0] );
    } );

    var oTable = $('#example').dataTable({
    "sDom": 'T<"fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix"lfr>t<"fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix"ip>',
    "sScrollY": '10%',
    "sScrollX" : '100%',
    "bAutoWidth":true,
    "bScrollCollapse": true,
    "bJQueryUI": true,
    "sPaginationType": "full_numbers",
    "iDisplayLength": 15,
    "oLanguage": {
    "sLengthMenu": "????_MENU_???",
    "sZeroRecords": "???,????????",
    "sInfo": "?????_START_??_END_???,?_TOTAL_???",
    "sInfoEmtpy": "Showing 0 to 0 of 0 records",
    "sInfoFiltered": "(?_MAX_??????)",
    "sSearch":"??:"
    },
    "aoColumnDefs": [
    { "bSortable": false, "aTargets": [ 0 ] },
    { "bSearchable": false, "bVisible": false, "aTargets": [ 8 ] },
    { "bSearchable": false, "bVisible": false, "aTargets": [ 9 ] },
    { "bSearchable": false, "bVisible": false, "aTargets": [ 10 ] },
    { "bSearchable": false, "bVisible": false, "aTargets": [ 11 ] },
    { "bSearchable": false, "bVisible": false, "aTargets": [ 12 ] },
    { "bSearchable": false, "bVisible": false, "aTargets": [ 13 ] },
    { "bSearchable": false, "bVisible": false, "aTargets": [ 14 ] },
    { "bSearchable": false, "bVisible": false, "aTargets": [ 15 ] }
    ],
    "aaSorting": [[1, 'asc']]
    });
    //oTable.fnSetColumnVis( 8, false);
    $('td img', oTable.fnGetNodes() ).each( function () {
    $(this).click( function () {
    var nTr = this.parentNode.parentNode;
    if ( this.src.match('details_close') )
    {
    this.src = "../../jquery/dataTables/images/details_open.png";
    oTable.fnClose( nTr );
    }
    else
    {
    this.src = "../../jquery/dataTables/images/details_close.png";
    oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
    }
    } );
    } );
    });

    [/code]
This discussion has been closed.