jQuery - Bootstrap Carousel Slid Event -
i'm trying make simple event handler on bootstrap carousel sliding, , test later if statements, i'm alerting current slide, keeps returning 0 (my first slide) though it's sliding 1 2, or 0 1 example, show 0.
var slide = $('#mycarousel .active').index('#mycarousel .item'); $("#mycarousel").carousel() $("#mycarousel").bind("slid", function(){ alert(slide); });
i fixed own issue adding in html of slider div's following
data-slide-number="1"
further detail shown here: http://bootsnipp.com/snipps/carousel-extended
Comments
Post a Comment