我在项目中使用 Bootstrap 和 Bootstrap Carousel。
我想知道是否有任何方法可以让 Carousel 导航到特定的幻灯片。
例如,像这样的东西:
$('myCarousel').to(2);
有人知道如何做到这一点吗?
最佳答案
来自文档:
.carousel(number) Cycles the carousel to a particular frame (0 based, similar to an array).
所以我认为应该是:
$('myCarousel').carousel(2);
关于javascript - 如何告诉 Bootstrap Carousel 转到特定索引?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9981638/