How can I keep the carousel on my bike?

Apparently, the demo page http://twitter.github.com/bootstrap/javascript.html#carousel seems like the carousel stops spinning after it reaches the rightmost image on the slide.

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

I tried

 $('#myCarousel').carousel() 

and

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

but the carousel continued to stop when it came to the last picture.

I saw some messages on the Internet that people really want to stop him on a bicycle forever, which was published as 3 weeks ago. http://groups.google.com/group/twitter-bootstrap/browse_thread/thread/9eeedbb0e68789e3/bf99468117bd669a

What should I do to keep my carousel spinning after it reaches the last image?

+4
source share
3 answers

This is actually a bug fixed in 2.0.2

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

 if (!$next.length) return 

See: issue 2036

+10
source

We have created an endless jquery scroller for our corporate website. Our approach was that when each image scrolled from the screen, we cloned it, add a clone to the opposite side and delete the one that just left the visible area.

+1
source

try it.

 $('.carousel').carousel() 

This is literally from the boot site. It makes no sense to me that this would not be concrete. But in any case, there is something to improve the document.

0
source

Source: https://habr.com/ru/post/1398744/


All Articles