Skip to content

Instantly share code, notes, and snippets.

@izifortune
Created July 22, 2013 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save izifortune/6057266 to your computer and use it in GitHub Desktop.
Save izifortune/6057266 to your computer and use it in GitHub Desktop.
Tab navigation for swiper
this.swiper = new Swiper('.swiper-container',{
centeredSlides: true,
slidesPerView: 'auto',
onSlideClick: function (swiper) {
swiper.swipeTo(swiper.clickedSlide.index());
},
onSlideChangeEnd: function(swiper) {
//Get active slide and work on the callback
var t = swiper.activeSlide();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment