Last active
August 29, 2015 14:17
-
-
Save slifin/9bf9ec60048737f80162 to your computer and use it in GitHub Desktop.
Dynamic ad container resizing
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
<img id="ad" src="http://aka-cdn-ns.adtechus.com/images/5205_gamezone_source_728x90_r1.jpg" alt="Adtech Ad" border="0"/> | |
<script type="text/javascript"> | |
(function(){ | |
'use strict'; | |
var container = window.parent.document.getElementById('focus-enclose'), | |
ad = document.getElementById('ad'); | |
if (ad&&container) | |
container.style.height = ad.offsetHeight+'px'; | |
})(); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment