footable in bootstrap 3 not initializing

后端 未结 3 1607
死守一世寂寞
死守一世寂寞 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:20

    You did answer your own question with regards to using the bootstrap wizard. The original question concerns footable. I struggled with it a little, but the solution is simple using the shown.bs.tab event.

    Use the following jQuery:

        $('.nav-tabs a').click(function (e) {
            e.preventDefault();
            $(this).tab('show');
        });
    
        $(function () {
            $('.footable').footable();
        });
    
        $("ul.nav-tabs > li > a").on("shown.bs.tab", function (e) {
            //fire initialize of footable because the footable plugin only processes tables that are visible
            $('.footable').trigger('footable_initialize');
        });
    

提交回复
热议问题