In the bootstrap carousel plug-in, how to trigger events when the carousel reaches the first and last one
漂亮男人2017-06-12 09:30:48
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);
});