Skip to content

Instantly share code, notes, and snippets.

@thibaudcolas
Created October 6, 2013 22:13
Show Gist options
  • Save thibaudcolas/6859797 to your computer and use it in GitHub Desktop.
Save thibaudcolas/6859797 to your computer and use it in GitHub Desktop.
Reproducing the noConflict iframeheight bug
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Page calling the iframe</title>
<style> body {background-color: black;} </style>
</head>
<body>
Hi, I'm host.
<iframe id="test" src="http://localhost:1337/iframe.html" frameborder="0"></iframe>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$.noConflict();
</script>
<script src="iframeheight.js"></script>
<script>
(function ($) {
$(document).ready(function () {
$('#test').iframeHeight({
minimumHeight: 500
});
});
})(jQuery);
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Embedded page</title>
<style>
body {
background-color: gray;
}
</style>
</head>
<body>
Hi, I'm Iframe !
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$.noConflict();
</script>
<script src="iframeheight.js"></script>
<script>
(function ($) {
$(document).ready(function () {
$.iframeHeightExternal();
});
})(jQuery);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment