Owl carousel sensitive drag causes slide changing while scrolling
Asked Answered
C

1

8

I'm working on a web application which is using owl carousel 2. My problem is that while I'm scrolling vertically over a slide, let's say slide2 this causes the change of the slide to slide 3 or slide 1. My carousel dragging is too sensitive causing me unnecessary slide changes.

Thanks in advance please help if you can I will really appreciate it.

Here are my owl carousel options

          // carousel setup
          $(".owl-carousel").owlCarousel
          ({
            responsive: true,
            lazyLoad:true,
            scrollPerPage:true,
            navigation : false,
            pagination: false, //remove pagination 
            slideSpeed : 200,    //default 200
            paginationSpeed : 400, //default 400
            singleItem: true,
            autoHeight: true,
            afterMove: top_align,
            afterMove: function(){ $(window).scrollTop(0);
             var owl = $("#viewport").data('owlCarousel');
             $(".tabBtn").removeClass("ui-btn-active").eq(owl.currentItem).addClass("ui-btn-active");
             }    
          });
            function top_align() {
            $(window).scrollTop(0);
            console.log('move');
            }
Catron answered 16/3, 2015 at 1:1 Comment(3)
can you create a fiddle and share with us?Timberlake
You can simply check the website behaviour at this link anetoi.com/anetoi_application.phpCatron
did you find anything about my problem mr Cerlin Boss ?Catron
L
1

I've had a quick look through the source code and it seems like you don't have the option to adjust the touchDrag sensitivity. You can disable it, however:

$('.own-carousel').ownCarousel({
    touchDrag: false
});
Linger answered 23/11, 2015 at 11:12 Comment(2)
i do not want remove drag movement...The problem comes when i try to swipe, the screen freezes before the swipe transition completes. This is not happening all the time. The problem exists if you drag from left to right or right to left and move your finger left and right. By this time the screen freezes and need another finger push to finish the transition successfully.Catron
have you tried to use dragEndSpeed ? let's say: "dragEndSpeed:880"Vookles

© 2022 - 2024 — McMap. All rights reserved.