Skip to content

Instantly share code, notes, and snippets.

@cherihung
Last active December 14, 2015 23:39
Show Gist options
  • Save cherihung/5167694 to your computer and use it in GitHub Desktop.
Save cherihung/5167694 to your computer and use it in GitHub Desktop.
change parent window height as child iframe's height decreases/increases with user interaction
function() {
var content_h = $("#myframe", window.parent.document).contents().find("body").height();
$('#myframe', window.parent.document).css( "height", content_h+"px" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment