Hello guys

I found a problem with the pager, because I was using a custom implementation of module Dialog and after any ajax call the pager is regenerated and appends to the current pager.

Please check the attached path to jquery.cycle.all.min.js

The change was

OLD Version

function buildPager(els,opts){
    var $p=$(opts.pager);
    $.each(els,function(i,o){
            $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
        });
     $.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);
   
}

New Version

function buildPager(els,opts){
    var $p=$(opts.pager);
    if($($p).children().length == 0){
        $.each(els,function(i,o){
            $.fn.cycle.createPagerAnchor(i,o,$p,els,opts);
        });
        $.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);
    }
}

This implementation validates that the pager doesn't have any elements rendered before.

Please consider including it in next stable release

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

-enzo-’s picture

Re uploaded fixed file

shima’s picture

Very grateful for your useful patch :)