Created
April 2, 2012 14:19
-
-
Save twhid/2283746 to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>Skeleton Parent Page</title> | |
<style type="text/css"> | |
html { | |
width: 100%; | |
height: 100%; | |
} | |
body { | |
margin: 0; | |
padding: 0; | |
width: 100%; | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<iframe id="ad-iframe" src="/url-to-ad-tag-page/" style="overflow: hidden; border: 0 none;"></iframe> | |
<script type="text/javascript"> | |
// a mock of code to resize iframe on the orientationchange event | |
(function() { | |
var resize; | |
(resize = function () { | |
var f = document.getElementById('ad-iframe'), | |
el = document.documentElement; | |
f.style.width = el.clientWidth + 'px'; | |
f.style.height = el.clientHeight + 'px'; | |
})(); | |
window.addEventListener("orientationchange", resize, true); | |
})(); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment