Skip to content

Instantly share code, notes, and snippets.

@temsool
Created November 30, 2020 07:21
Show Gist options
  • Save temsool/9f47735893f3e40eff8d59af50d1817b to your computer and use it in GitHub Desktop.
Save temsool/9f47735893f3e40eff8d59af50d1817b to your computer and use it in GitHub Desktop.
swiper
if (jQuery('.logo-slider').length) {
var mySwiper = document.querySelector('.logo-slider .swiper-container').swiper;
$('.slider-nav-btn.prev').on('click', function (e) {
e.preventDefault();
mySwiper.slidePrev();
});
$('.slider-nav-btn.next').on('click', function (e) {
e.preventDefault();
mySwiper.slideNext();
});
}
@temsool
Copy link
Author

temsool commented Jan 18, 2024

if(jQuery('.tatihceslider').length){

jQuery('.tatihceslider .timeline-item a').on('click',function(){
var index=jQuery(this).attr('data-index')+1;

document.querySelector('.tatihceslider .swiper-carousel').swiper.slideTo(index);

});

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment