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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -