更改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="#"> </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"> </a>
<a href="#" class="dot"> </a>
<a href="#" class="dot"> </a>
</div>
如何更改 Cycle 选项,以便它可以移动“Prev”和“Next”之前的三个“点”类?如:
<div id="slideshow-prevnext" class="slideshow-prevnext">
<a href="#" class="dot"> </a>
<a href="#" class="dot"> </a>
<a href="#" class="dot"> </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>
谢谢,
I have this:
<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="#"> </a>';
}
});
});
And it makes HTML markup like this:
<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"> </a>
<a href="#" class="dot"> </a>
<a href="#" class="dot"> </a>
</div>
How can I change Cycle option so that it can move the three "dot" class before "Prev" and "Next"? Such as:
<div id="slideshow-prevnext" class="slideshow-prevnext">
<a href="#" class="dot"> </a>
<a href="#" class="dot"> </a>
<a href="#" class="dot"> </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>
Thank you,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://forum.jquery.com/topic /change-jquery-cycle-plugin-code-move-pager-position
http://forum.jquery.com/topic/change-jquery-cycle-plugin-code-move-pager-position