Skip to content

Instantly share code, notes, and snippets.

@ihorduchenko
Created July 31, 2017 12:00
Show Gist options
  • Save ihorduchenko/bdedf6867bb01986b10e99aa8c2834f3 to your computer and use it in GitHub Desktop.
Save ihorduchenko/bdedf6867bb01986b10e99aa8c2834f3 to your computer and use it in GitHub Desktop.
Swiper with displaying number of current slide
var swiper = new Swiper('#servicing-top-slider', {
pagination: '.servicing-top-pagination',
paginationType: 'fraction',
paginationClickable: true,
nextButton: '.swiper-next',
prevButton: '.swiper-prev',
spaceBetween: 0,
watchActiveIndex: true,
onSlideChangeEnd: function () {
$(".presSlidesActive").text(pressSwiper.activeIndex +1);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment