Twitter Bootstrap版本:2.0.3
示例HTML代码:
- <!DOCTYPE html>
- <html dir="ltr" lang="en-US" xmlns:og="http://opengraPHProtocol.org/schema/">
- <head>
- <link rel="stylesheet" type="text/css" media="all" href="reddlec/style.css" />
- <script type="text/javascript">
- $(document).ready(function() {
- $('.carousel').each(function(){
- $(this).carousel({
- pause: true,interval: false
- });
- });
- });
- </script>
- <script src="http://twitter.github.com/bootstrap/assets/js/jquery.js"></script>
- <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-transition.js"></script>
- <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-carousel.js"></script>
- </head>
- <body>
- <div id="myCarousel" class="carousel slide">
- <!-- Carousel items -->
- <div class="carousel-inner">
- <div class="active item">…</div>
- <div class="item">…</div>
- <div class="item">…</div>
- </div>
- <!-- Carousel nav -->
- <a class="carousel-control left" href="#myCarousel" data-slide="prev">‹</a>
- <a class="carousel-control right" href="#myCarousel" data-slide="next">›</a>
- </div>
- </body>
- </html>
CSS:提供bootstrap.css
问题:如您所见,我已启用了暂停模式,并禁用了自行车。但是当我点击轮播的左侧或右侧控件时,轮播会以默认间隔(每个周期5秒)在鼠标左键开始循环。
如何强制禁用骑车?我想让用户手动循环图像。
您可以在我的测试网站here上测试问题。