Skip to content

Instantly share code, notes, and snippets.

@picsoung
Created October 11, 2013 08:32
Show Gist options
  • Save picsoung/6931489 to your computer and use it in GitHub Desktop.
Save picsoung/6931489 to your computer and use it in GitHub Desktop.
script to resize iframe in wordpress
<script language="JavaScript">
function frameResize(frameObj) {
var frameHeight;
// Reset the height back to it's original (shrink the frame)
frameObj.height = '800px';
// Set the frame height to match the content
frameHeight = frameObj.contentWindow.document.body.scrollHeight;
frameObj.height = frameHeight + 'px';
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment