Reputation: 21302
When the window is resized, I need to know how big the table is, so I can dynamically fit everything else nicely in-between. The table height is solely dependant on the contents, which are loaded dynamically. How do you calculate the rendered height of the table in JavaScript?
Upvotes: 5
Views: 19868
Reputation: 1109875
You can use element.offsetHeight
for this.
var table = document.getElementById("tableId");
alert(table.offsetHeight);
Upvotes: 16