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

Brent W

Well-known member
#1
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?
 

Mr Lucky

Well-known member
#3
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.
 
Top