Skip to content

Instantly share code, notes, and snippets.

@underdown
Created April 23, 2012 23:37
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save underdown/2474608 to your computer and use it in GitHub Desktop.
Save underdown/2474608 to your computer and use it in GitHub Desktop.
responsive ads
<script type="text/javascript"><!--
google_ad_client = "ca-pub-3658299045266116";
/* top */
if ($(window).width()<728 ){
google_ad_slot = "4414183254";
google_ad_width = 320;
google_ad_height = 50;
}else{
google_ad_slot = "1020377061";
google_ad_width = 728;
google_ad_height = 90;
}
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
@LiamDawe
Copy link

For me this doesn't actually work, mine always shows the bigger one :(, doesn't seem to dynamically resize when you resize the window.

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