1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Javascript to show one ad network over 800px and the rest under

Discussion in 'General PHP and MySQL Discussions' started by BamaStangGuy, Jun 14, 2014.

  1. BamaStangGuy

    BamaStangGuy Well-Known Member

    I have an advertising ad network that is not mobile friendly. I want to use javascript to load that network tag for anything over 743px and if it is less than that I want it to show my adsense responsive tags.

    Whats the best way to go about this?
     
  2. 0ptima

    0ptima Well-Known Member

  3. Mr Lucky

    Mr Lucky Well-Known Member

    I've also been looking into this. I don't think the Adsense responsive code gives you an option to not have the ad at specified widths, just to change the dimensions.

    I think the easy way might be to use divs with display:none depending on the browser width, however I get the feeling that putting Adsense in an hidden elements may contravene Google's terms so it needs to be a way that doesn't include the Adsense on the page source but be hidden from view.
     

Share This Page