I try to get size of main div on page, to make iframe change its height to content, but document.getElementById("divId").offsetHeight
(also try innerHeight
) return wrong value. It always returns 247, but in fact page looks like it cut on 75%. I have an idea that page didn't load fully, so I put resize code in the footer of the page, but it still return 247.
$(document).ready(function() {
console.log(document.getElementById("resizeDiv").offsetHeight);
});
Any suggestions?