我正在制作一个包含cycle-all插件的幻灯片,我希望页面锚点在页面的其他地方为div。
如何使.pager div对应于.section-testimonials幻灯片?
这里是标记和jquery:
<div id="slide-nav">
<div class="pager">
<div>
stuff in here
</div>
</div>
<div class="pager">
<div>
stuff in here
</div>
</div>
<div class="pager">
<div>
stuff in here
</div>
</div>
</div>
$('.section-testimonials').cycle({
fx: 'fade',
speed: 1000,
containerResize: 0,
timeout: 9000,
pager: '#slide-nav',
pagerEvent: 'mouseover',
pauseOnPagerHover: true,
pagerAnchorBuilder: function(idx, slide) {
// return sel string for existing anchor
return '#slide-nav .pager:eq(' + (idx) + ') a';
}
});