blob: ae7bf9afed9c3bd58137d04c04780d46dc56f391 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$(document).ready(function () {
function pageY(elem) {
return elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop;
}
var buffer = 0; //scroll bar buffer
function resizeIframe() {
var height = document.documentElement.clientHeight;
height -= pageY(document.getElementById('ifm')) + buffer;
height = (height < 0) ? 0 : height;
document.getElementById('ifm').style.height = height + 'px';
}
document.getElementById('ifm').onload = resizeIframe;
window.onresize = resizeIframe;
});
|