Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I keep carousel keep cycling?

Apparently, the demo page on the http://twitter.github.com/bootstrap/javascript.html#carousel seems to have carousel stop rotating after it reaches the right most picture in the slide.

The demo used $('#myCarousel').carousel() to start carousel.

I tried

$('#myCarousel').carousel()

and

$('#myCarousel').carousel('cycle')

but carousel kept stopping when it reaches to the last picture.

I have seen some posts on the web that people actually want to stop it from cycling forever, which was posted like 3 weeks ago. http://groups.google.com/group/twitter-bootstrap/browse_thread/thread/9eeedbb0e68789e3/bf99468117bd669a

What should I do so that my carousel will continue rotating after it reaches the last picture?

like image 248
user482594 Avatar asked Dec 22 '22 01:12

user482594


1 Answers

This is actually a bug that has been fixed in 2.0.2

You can try deleting line 86 in bootstrap-carousel.js which is,

if (!$next.length) return

See: issue 2036

like image 51
Alexander Poslavsky Avatar answered Jan 02 '23 05:01

Alexander Poslavsky