How to dynamically change jQuery Datatables height

前端 未结 8 1884
情话喂你
情话喂你 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:39

    Simply put it like this:

    $('#example').dataTable({
       "sScrollY": "auto"
    });
    

提交回复
热议问题