I'm using jQuery cycle to build 4 separate thumbnail slideshows on a portfolio page. Each slideshow has it's own next/prev button. But every next/prev button only advances the first slideshow, and I'm not sure how to fix that.
HTML Code: (repeated 4 times)
<div class="slider">
<div class="slides">
<div>
<img src="images/portfolio/ident1.jpg" alt=""/>
<img src="images/portfolio/ident2.jpg" alt=""/>
<img src="images/portfolio/ident3.jpg" alt=""/>
<img src="images/portfolio/ident4.jpg" alt=""/>
</div>
</div><!--end of slides-->
</div><!--end of slider-->
<img src="images/arrow-L.png" alt="Left" class="slider-arrow-left"/>
<img src="images/arrow-R.png" alt="Right" class="slider-arrow-right"/>
jQuery code:
$(document).ready(function(){
$(".call-button").toggle(
function() {
$(this).animate({ left: "0" }, 1000 );
},
function() {
$(this).animate({ left: "-225px" }, 1000 );
});
$('.slides').cycle({
fx: 'scrollHorz',
speed: 'slow',
timeout: 0,
nowrap: true,
pause: 1,
prev: $('.slider-arrow-left'),
next: $('.slider-arrow-right'),
cssBefore:{
top: 0,
opacity: 1,
display: 'block'
},
animOut: {
top: 360
},
before: function(curr, next, opts){
var $curr = $(curr);
var $next = $(next);
},
pause: 1,
pager: '.slider-controls',
pagerAnchorBuilder: function (idx, slide) {
return '.slider-controls li:eq(' + idx + ') a';
}
});
});