footable in bootstrap 3 not initializing

后端 未结 3 1610
死守一世寂寞
死守一世寂寞 2021-01-16 02:25

the excellent footable plugin I\'m trying to integrate in by twitter bootstrap doesn\'t initialize. That is to say, thank to my firebug inspector, I can see the table is han

3条回答
  •  逝去的感伤
    2021-01-16 03:01

    It is because fooTable cannot tell the size of the screen when it is in a hidden div/tab.

    Use the following jQuery:

    $(document).ready(function() { 
        $('.nav-tabs a').click(function (e) {
            //prevents re-size from happening before tab shown
            e.preventDefault();
            //show tab panel
            $(this).tab('show');  
            //fire re-size of footable
            $('.footable').trigger('footable_resize'); 
        });
    }); 
    

提交回复
热议问题