How to dynamically change jQuery Datatables height

前端 未结 8 1906
情话喂你
情话喂你 2021-01-31 05:25

I\'m using jQuery Datatables. I want to change the height of the table whenever a user resizes the window. I\'m able to catch the window resize event which allows me to calculat

8条回答
  •  难免孤独
    2021-01-31 05:48

    I think you can change the height of the table by css

    $(window).resize(function(){
           $('#yourtable').css('height', '100px');
    });
    

提交回复
热议问题