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

XF 1.2 BuySellAds responsive - will this work?

Discussion in 'Styling and Customization Questions' started by Mouth, Nov 16, 2013.

  1. Mouth

    Mouth Well-Known Member

    www.BuySellAds.com does not support responsive sites, as they use < div > for their ad injection.
    I wondered if this would work to deliver different size ad assets based on browser width?

    <SCRIPT LANGUAGE="javascript">
    if (window.innerWidth <= 320) {
      document.write("<div>phone/small size ad</div>");
    } else if (window.innerWidth <= 768) {
      document.write("<div>tablet/medium size ad</div>");
    } else {
      document.write("<div>desktop/full size ad</div>");

Share This Page