Article From:https://segmentfault.com/q/1010000011703197
Question:

swiperHow can we trigger another sliding event after sliding to the last picture? In the case of Jingdong in the following picture, the merchandise map slides to the last one and then slides to the detail page. How do you write this in swiper?

Answer 0:

Define the variable snum that records the number of swiper.
Add events in the swiper definition.

onSlideChangeEnd:function(swiper){
    if(snum == swiper.activeIndex){
        //Execution of events}}

Leave a Reply

Your email address will not be published. Required fields are marked *