javascript - In the bootstrap carousel plug-in, how to trigger events when the carousel reaches the first and last items?
迷茫
迷茫 2017-06-12 09:28:48
0
1
752

In the bootstrap carousel plug-in, how to trigger events when the carousel reaches the first and last one

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(1)
漂亮男人

Resolved
Quote http://www.cnblogs.com/zuoyif...

  $('#myCarousel').on('slide.bs.carousel', function (event) {
        var $hoder = $('#myCarousel').find('.item'),
            $items = $(event.relatedTarget);
        //getIndex就是轮播到当前位置的索引
        var getIndex= $hoder.index($items);
    });
                
            
            
        
        
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template