$(
‘#myCarousel‘
).on(
‘slide.bs.carousel‘
,
function
(event) {
var
$hoder = $(
‘#myCarousel‘
).find(
‘.item‘
),
$items = $(event.relatedTarget);
//getIndex就是轮播到当前位置的索引
var
getIndex= $hoder.index($items);
})
原文地址:https://www.cnblogs.com/moguzi12345/p/9869248.html
时间: 2024-10-12 04:40:14