Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#1 | jquery.cycle_.all_.min_.js_.txt | 26.3 KB | -enzo- |
jquery.cycle_.all_.min_.js_.txt | 26.3 KB | -enzo- |
Comments
Comment #1
-enzo- CreditAttribution: -enzo- commentedRe uploaded fixed file
Comment #2
shima CreditAttribution: shima commentedVery grateful for your useful patch :)