【问题标题】:How to make Bootstrap Carousel to start from the first slide on button click?如何使 Bootstrap Carousel 从按钮单击的第一张幻灯片开始?
【发布时间】:2015-06-12 09:37:02
【问题描述】:

我在我的网站中使用 Bootstrap Carousel 并希望实现此目的:轮播应该重置并从按钮单击的第一张幻灯片开始。 有可能吗?

【问题讨论】:

  • 是的,当然...请阅读this

标签: javascript twitter-bootstrap twitter-bootstrap-3 carousel


【解决方案1】:
$('#yourButton').click(function() {
   $('.carousel').carousel(0); 
});    

Bootstrap documentation : .carousel(number)

【讨论】:

    猜你喜欢
    • 2013-04-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-27
    • 2017-05-22
    • 2019-02-15
    • 1970-01-01
    相关资源
    最近更新 更多