简体   繁体   English

2组下一个/上一个按钮jquery周期

[英]2 sets of next/prev buttons jquery cycle

How do I have two set of the next/ prev on a jquery cycle I currently have one set here 我如何在jquery周期上有两组next / prev我目前在这里有一组

$('#s10').cycle({
    fx:    'fade',
    delay: -1000,
    next:   '#nexttop', 
    prev:   '#prevtop'
});

But can't seem to figure out how to add a second set to the next: and prev: lines. 但是似乎无法弄清楚如何向next:和prev:行添加第二组。

Instead of using IDs like #nexttop and #prevtop , use a class shared by two distinct elements: 代替使用#nexttop#prevtop类的ID,而使用两个不同元素共享的类:

$('#s10').cycle({
    fx:    'fade',
    delay: -1000,
    next:   '.next', 
    prev:   '.prev'
});​

http://jsfiddle.net/mblase75/yThgx/ http://jsfiddle.net/mblase75/yThgx/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM