$('.photo .slide').each(function(index){
var $thisObj = $(this);
var totalCount = new Array();
totalCount[index] = $thisObj.find('li').length;
totalN = totalCount - 1;
$thisObj.bxSlider({
auto: false,
pager: false,
controls: true,
minSlides: 3,
maxSlides: 3,
moveSlides: 1,
startSlide: totalN,
slideWidth: 1100,
slideHeight: 800,
slideMargin: 100,
nextSelector: '#slider-next2',
prevSelector: '#slider-prev2',
onSlideNext: function($slideElement, oldIndex, newIndex) {
$('.photo .slide li.acco_slide').removeClass('active');
$('.photo .slide li.acco_slide').eq(newIndex+4).addClass('active');
},
onSlidePrev: function($slideElement, oldIndex, newIndex) {
$('.photo .slide li.acco_slide').removeClass('active');
$('.photo .slide li.acco_slide').eq(newIndex+4).addClass('active');
},
onSliderLoad: function(currentIndex){
$('.photo .slide li.acco_slide').removeClass('active');
$('.photo .slide li.acco_slide').eq(currentIndex+4).addClass('active');
}
});
});
댓글