Expand Table height when DIV is hidden
Expand Table height when DIV is hidden

In my html, I have a div that contains my custom filters and right below it is the table used by DataTables. I have a button right above the table but outside of the div. When I click the button I use the jQuery toggle function to hide the div with the filters. It works as expected, but I'd like my table to expand and fill the space the div was taking. When I click the button again, I'd like the table to resize since the div is now visible. Currently, when the table is hidden, the table shifts up (does not resize) to fill the void left by the div. Thanks.
Replies
Can you provide an example so we can look and provide suggestions?
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Hi Kevn,
Please navigate to the following:
https://codepen.io/dmalikyar/project/editor/ZowmjO
Please drag the preview pane all the way to the top. You'll see a div with filters, a Toggle Filter button, and the datatable below it. I'd like the datatable to expand and take up the whole page when I toggle the div to be hidden. Now, it just gets pushed up at the same size. Please let me know if you need anymore details.
Thanks
Daoud
This blog post should help, it's showing how it can fill spaces.
Colin