为了简短起见,我尝试为 jquery 循环插件选择#small-cycle1、#small-cycle2 等。使用通配符选择它似乎不起作用,因为它将所有周期的寻呼机导航写入每个周期。
下面是我现在如何解决这个问题。
$('#small-cycle1').cycle({
speed: 0,
timeout: 0,
pager: '#nav1',
pagerEvent: 'mouseover',
pauseOnPagerHover: true
});
$('#small-cycle2').cycle({
speed: 0,
timeout: 0,
pager: '#nav2',
pagerEvent: 'mouseover',
pauseOnPagerHover: true
});
$('#small-cycle3').cycle({
speed: 0,
timeout: 0,
pager: '#nav3',
pagerEvent: 'mouseover',
pauseOnPagerHover: true
});
$('#small-cycle4').cycle({
speed: 0,
timeout: 0,
pager: '#nav4',
pagerEvent: 'mouseover',
pauseOnPagerHover: true
});
$('#small-cycle5').cycle({
speed: 0,
timeout: 0,
pager: '#nav5',
pagerEvent: 'mouseover',
pauseOnPagerHover: true
});
是否可以在选择器和寻呼机中使用通配符:选项?