Created
October 11, 2013 08:32
-
-
Save picsoung/6931489 to your computer and use it in GitHub Desktop.
script to resize iframe in wordpress
This file contains 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
<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