How to Use slideDown (or show) function on a table row?

后端 未结 21 2109
清歌不尽
清歌不尽 2020-11-22 09:03

I\'m trying to add a row to a table and have that row slide into view, however the slidedown function seems to be adding a display:block style to the table row which messes

21条回答
  •  孤街浪徒
    2020-11-22 09:39

    Have a table row with nested table:

    
        
            All row content inside here

    To slideDown the row:

    $('.dummyRow').show().find("table").slideDown();
    

    Note: the row and it's content (here it is "table") both should be hidden before animation starts.


    To slideUp the row:

    $('.dummyRow').find("table").slideUp('normal', function(){$('.dummyRow').hide();});
    

    The second parameter (function()) is a callback.


    Simple!!

    Note that there are also several options that can be added as parameters of the slide up/down functions (the most common being durations of 'slow' and 'fast').

提交回复
热议问题