how to revert back to normal after display:none for table row

前端 未结 9 1023
迷失自我
迷失自我 2020-12-11 14:42

Basically, I have a table. Onload, I set each row of the table to display:none since I have a lot of javascript processing to be done and I don\'t want user to

9条回答
  •  一向
    一向 (楼主)
    2020-12-11 14:59

    When switching between hiding and showing TRs using toggleClass, the following will work:

    display:none;
    

    and

    display: table-row;
    

    E.g.

    $('#the_tr_id').toggleClass('tr_show','tr_hide');
    

    Where:

    .tr_hide {
        display:none;
    }
    
    .tr_show {
        display: table-row;
    }
    

提交回复
热议问题