XF 1.5 Banner rotation not working


Well-known 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>

Top Bottom