Skip to content

Instantly share code, notes, and snippets.

@withremote
Last active December 12, 2015 01:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save withremote/4693420 to your computer and use it in GitHub Desktop.
Save withremote/4693420 to your computer and use it in GitHub Desktop.
Iframe not auto expanding in IE8 or lower on XP
<iframe src="/somelocalfile.htm" frameborder="0" scrolling="no" width="100%" id="myIframe" class="auto-height"></iframe>
<script type="text/javascript" src="/js/libs/iframe-auto-height/jquery.iframe-auto-height.js"></script>
<script language="JavaScript">
jQuery('iframe.auto-height').iframeAutoHeight({
heightOffset: 10,
minHeight: 300
});
</script>
@withremote
Copy link
Author

Removing the $(document).ready fixed the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment