$(
'#myCarousel'
).on(
'slide.bs.carousel'
,
function
(event) {
var
$hoder = $(
).find(
'.item'
),
$items = $(event.relatedTarget);
//getIndex就是轮播到当前位置的索引
getIndex= $hoder.index($items);
})