Click here to Skip to main content
15,880,405 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
<pre lang="Javascript">


document.addEventListener("DOMContentLoaded", function () {
  var swiper = new Swiper(".mySwiper", {
    spaceBetween: 0,
    loop: true,
    speed: 1000,
    autoplay: {
      delay: 4000,
      disableOnInteraction: false,
    },
    pagination: {
      el: ".swiper-pagination",
      clickable: true,
    },
    navigation: {
      nextEl: ".left98",
      prevEl: ".right98",
    },
  });
  var swiper2 = new Swiper(".mySwiper2", {
    direction: "vertical",
    slidesPerView: 1,
    loop: false,
    speed: 1000,
    mousewheel: true,
    longSwipes: false,
    continuousVertical: false,
    scrollOverflowOptions: null,
    threshold: 1,
    shortSwipes: true,
    spaceBetween: 0,
    pagination: {
      el: ".swiper-pagination",
      clickable: true,
    },
  });
});


What I have tried:

tried every sort of way so I just want to disable long swipes and want to show only 1 slide at time after swiping (verticle swipe)
Posted
Comments
[no name] 16-Apr-22 10:24am    
Maybe stick with "one" swiper; 2 at the same time probably makes for cross purposes. Or you need to hook the swipe and interpret it yourself if simple properties won't do it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900