• I am using the AdSanity plugin. It supports two widgets. One displays a single ad constantly, the other displays a group of ads. I know of a wordpress customized site at vype.com that is using AdSanity in a way that allows the group of ads to rotate like a jquery image fading slideshow. I’ve got this code to work with:

    $(function adsanity-group() {
        var adsLists = $('.adsanity-group'),
            i = 0;
        var divs = new Array();
    
        adsLists.each(function() {
            divs[i] = $("#" + $(this).attr('id') + " div").not(".clearfix").hide();
            i++;
        });
    
        var cycle_delay = 12000;
        var num_groups = $('.adsanity-group').length;
    
        function cycle(divsList, i) {
            divsList.eq(i).fadeIn(400).delay(cycle_delay).fadeOut(400, function() {
                cycle(divsList, ++i % divsList.length); // increment i, and reset to 0 when it equals divs.length
            });
        };
    
        for (var j = divs.length - 1; j >= 0; j--) {
            if (divs[0].eq(0).attr('num_ads') > 1)
                cycle(divs[j], 0);
            else
                divs[j].show();
        };

    How can I make my AdSanity plugin load this script on my site at dsnamerica.com/eisn/?

    I’ve tried adding this in the head of header.php:
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/fading-ads.js"></script>

    and of course loaded that file to that location. The class “adsanity-group” that is used in the script above is the same class name that the plugin uses.

    Thanks all

  • The topic ‘AdSanity plugin – Group of ads rotate as jquery image slider’ is closed to new replies.