更改Jquery Cycle插件代码(移动寻呼机位置)

时间:2011-02-17 23:41:20

标签: jquery cycle pager

我有这个:

<script type="text/javascript">
$(function() {
$('#slideshow').after('<div id="slideshow-nav">').cycle({
    fx:       'fade',
    timeout:   0,
    prev: '#prev',
    next: '#next',
    fit:1,
    pager:      '#slideshow-prevnext',
    pagerAnchorBuilder: function(idx, slide) { 
    return '<a class="dot" href="#">&nbsp;</a>'; 
        }
});
});

它会像这样制作HTML标记:

 <div id="slideshow-prevnext" class="slideshow-prevnext"> 
   <a id="prev" class="left"  href="#"><span class="invisible">Prev</span></a> 
   <a id="next" class="right" href="#"><span class="invisible">Next</span></a> 
   <a href="#" class="dot">&nbsp;</a>
   <a href="#" class="dot">&nbsp;</a>
   <a href="#" class="dot">&nbsp;</a>
</div>

如何更改Cycle选项以便它可以在“Prev”和“Next”之前移动三个“dot”类?如:

 <div id="slideshow-prevnext" class="slideshow-prevnext"> 
   <a href="#" class="dot">&nbsp;</a>
   <a href="#" class="dot">&nbsp;</a>
   <a href="#" class="dot">&nbsp;</a>
   <a id="prev" class="left"  href="#"><span class="invisible">Prev</span></a> 
   <a id="next" class="right" href="#"><span class="invisible">Next</span></a> 
</div>

谢谢,