Created
May 3, 2016 21:08
-
-
Save jtrezza/fdbaa51bf2c030efd4a54a847a47e4d4 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
<head> | |
<script type="text/javascript"> | |
window.iFrameResizer = { | |
readyCallback: function(){ | |
parentIFrame.sendMessage(documentHeight()) | |
} | |
} | |
function documentHeight() { | |
return Math.max( | |
document.documentElement.clientHeight, | |
document.body.scrollHeight, | |
document.documentElement.scrollHeight, | |
document.body.offsetHeight, | |
document.documentElement.offsetHeight | |
); | |
} | |
</script> | |
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/iframe-resizer/3.5.3/iframeResizer.contentWindow.js"></script> | |
</head> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment