Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 twitter 引导轮播插件的控件上添加播放/暂停按钮。
在你的按钮上使用.carousel('cycle')和.carousel('pause')方法,监听任何事件,像这样:
.carousel('cycle')
.carousel('pause')
$("#playButton").click(function() { $("#theCarousel").carousel("cycle"); }); $("#pauseButton").click(function() { $("#theCarousel").carousel("pause"); });