admin管理员组

文章数量:1291122

I am using the iDangerous Swiper. By default if you touch and drag the first slide to the right, it allows you to kind of force it to the right, similar to how an iphone browser works, where it is kind of elastic and it only lets you drag a little. Is there a a paremeter to prevent this? I would also want the last slide to not be able to slide more to the left, since it will reveal what is underneath.

I am using the iDangerous Swiper. By default if you touch and drag the first slide to the right, it allows you to kind of force it to the right, similar to how an iphone browser works, where it is kind of elastic and it only lets you drag a little. Is there a a paremeter to prevent this? I would also want the last slide to not be able to slide more to the left, since it will reveal what is underneath.

Share Improve this question asked Nov 4, 2016 at 20:50 William HowleyWilliam Howley 4936 silver badges20 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 12

found it... need to initialize with resistanceRatio: 0

var swiper = new Swiper(this.swiperContainer, {
    resistanceRatio: 0
});

本文标签: javascriptswiper apihow to stop a slide from overscrollingStack Overflow