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

XF 1.5 Banner rotation not working

Discussion in 'Styling and Customization Questions' started by Temery, Feb 12, 2016.

  1. Temery

    Temery Active Member

    I've successfully use the following to rotate ad banners. I recently created a new style, with no modifications - for some reason the banner rotation code doesn't work - both banners show up.

    Any idea why this would work with one style, and not with another?


    <xen:hook name="ad_above_top_breadcrumb" />

    <table border="0" width="728" height="150">

    <script type="text/javascript">

    this.randomad = function(){
    var length = $("#adr li").length;
    var ran = Math.floor(Math.random()*length) + 1;
    $("#adr li:nth-child(" + ran + ")").show();



    <ul id="adr">

    <li><center>ad code here</center></li>
    <li><center>ad code here</center></li>


Share This Page