Skip to content

Commit

Permalink
[FIX] multiple news carousels (swiper) (Podio bug_42) (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
vhusaruk92 authored and dmh committed Oct 18, 2016
1 parent 9e5d53d commit 4685c3f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dev/js/main/plugins/news/newsCarousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@

// initialize swiper when document ready
// http://idangero.us/swiper/api/
$('.js__news-carousel').swiper({
nextButton: '.js__news-carousel__btn-next',
prevButton: '.js__news-carousel__btn-prev',
$('.js__news-carousel').each(function(){
$(this).swiper({
nextButton: $(this).parent().find('.js__news-carousel__btn-next'),
prevButton: $(this).parent().find('.js__news-carousel__btn-prev'),
pagination: '.js__news-carousel__pagination',
paginationClickable: true,
slidesPerView: 4,
Expand All @@ -35,6 +36,7 @@
slidesPerView: 4
}
}
});
});
});

Expand Down

0 comments on commit 4685c3f

Please sign in to comment.