siema
siema copied to clipboard
Add class to visible items
Hi there! I am struggling to add a class to the current slides if you have multiple items enabled. So far I found something like this:
function currentSlide() {
$('.item').removeClass('current');
$('.siema').find('.item').eq(this.currentSlide).addClass('current');
}
onInit: currentSlide,
onChange: currentSlide,
But this only adds the current class to one item. Since I am using a carousel with 3 items visible at once, I need to add the class to all of the items (which are visible). Is this possible? Thanks in advance!
Can you not find the item per index and loop through this.perPage?