Swipe icon indicating copy to clipboard operation
Swipe copied to clipboard

a bug

Open riskers opened this issue 10 years ago • 2 comments

Hi, i find a bug when continuous is true and the contains of swipe only two :

        <div id="swipeBanner" class="swipe">
            <div class="swipe-wrap">
                <div>
                    <a href="#" class="js-link">
                        <img src="http://p8.qhimg.com/t011d09db6e0a82b2d4.jpg"> 
                    </a>
                </div>
                <div>
                    <a href="#" class="js-link">
                        <img src="http://p1.qhimg.com/t010690128aa27118ba.jpg">
                    </a>
                </div>
            </div>
       </div>
var ele = $('#swipeBanner').get(0)

var swipe = Swipe(ele,{
    continuous : true ,
    disableScroll : true ,
    transitionEnd : function(index,ele){
        console.log(swipe.getPos())
    }
})

then,the contain has four swipes actually : aa

riskers avatar Jun 29 '15 12:06 riskers

I could be wrong, but are the div's at index 0 and 3 not the cloned div's?

This is by design I'd imagine since when reaching the last slide, you'd want to go back to the first slide. To do this, they're cloning the first and appending it to then end. Likewise with the last div - they're cloning it and pre-pending it before the first div.

seanheinen avatar Sep 11 '15 11:09 seanheinen

@riskers , Hi you can try https://github.com/lyfeyaj/swipe, an active developing fork of this project which have this issue fixed.

lyfeyaj avatar Oct 20 '15 01:10 lyfeyaj