jQuery Cycle - repeated numbers/bullets
Hello,
I've run across an funny issue when using the Featured Posts widget for the Suffusion theme in Wordpress. The theme's author can't quite figure it out, either. This widget uses the jquery cycle plugin and the website with the issue is
http://watsoncatholic.ca
What happens is that the bullets (or numbers) at the bottom of the slider are doubled. The index (idx) goes from 0-4, and then this is repeated again.
The code that calls the .cycle function is:
-
$j('#<?php echo $widget_id; ?>-sliderContent').cycle({
-
fx: '<?php echo $transition_effect; ?>',
-
timeout: <?php echo $frame_time; ?>,
-
speed: <?php echo $frame_delay; ?>,
-
pause: 1,
-
sync: 0,
-
pager: '#<?php echo $widget_id; ?>-sliderPager',
-
prev: 'a.sliderPrev',
-
next: 'a.sliderNext',
-
pagerAnchorBuilder: function (idx, slide) {
-
var anchor;
-
if ('<?php echo $index_style; ?>' == 'numbers') {
-
anchor = (idx + 1);
-
}
-
else {
-
anchor = ' ';
-
}
-
return '<!-- idx=' + idx + ' slide=' + slide + ' --> <a href="#">' + anchor + '</a>';
-
}
-
});
(I've added the html comment code so that I can see the idx and slide values in the generated html.)
This produces the following:
-
<div id="suf-featured-posts-2-sliderPager" class="sliderPager left">
-
<!-- idx=0 slide=[object HTMLLIElement] -->
-
<a href="#" class=""> </a>
-
<!-- idx=1 slide=[object HTMLLIElement] -->
-
<a href="#" class="activeSlide"> </a>
-
<!-- idx=2 slide=[object HTMLLIElement] -->
-
<a href="#" class=""> </a>
-
<!-- idx=3 slide=[object HTMLLIElement] -->
-
<a href="#" class=""> </a>
-
<!-- idx=4 slide=[object HTMLLIElement] -->
-
<a href="#" class=""> </a>
-
<!-- idx=0 slide=[object HTMLLIElement] -->
-
<a href="#"> </a>
-
<!-- idx=1 slide=[object HTMLLIElement] -->
-
<a href="#"> </a>
-
<!-- idx=2 slide=[object HTMLLIElement] -->
-
<a href="#"> </a>
-
<!-- idx=3 slide=[object HTMLLIElement] -->
-
<a href="#"> </a>
-
<!-- idx=4 slide=[object HTMLLIElement] -->
-
<a href="#"> </a>
-
</div>
As you can see, the idx goes from 0-4, and then the whole thing repeats again. But only the first 0-4 numbers/bullets are active.
Any ideas? :-)
Thanks so much!