Last active
August 25, 2018 15:38
-
-
Save esironal/84673f7ab4bd2f22e8e73b72807229cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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; | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="content-wrapper"> | |
<div id="content" class="app-external" role="main"> | |
<iframe id="ifm" src="https://mydraft.cc/"></iframe> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment