* Graham * Keyarn wrap it in a 'for' loop
<script> var x = document.getElementsByClassName("myads");
for (i=0;i < 2;i++){
........
}

although it could overwrite the same element
so think of the setting as a maximum
If you want it so there are always the same number of ads

If the ad has already been set it repeats the iteration by subtracting 1 from the loop count
2017-02-19 15:51 (edited 2017-02-19 16:27 by Graham ) · (0)

Online: Guests: 1