I'm using twitter bootstrap and the carousel feature. The markup is shown below.
I'm trying to achieve something where on page load, 1. the carousel starts on the first slide and holds there (lets say 500ms). 2. Then it moves to slide 2 and stops forever.
There are only 2 slides and the user could move between them with the arrows, but this shouldn't trigger constant cycling of slides. (this is not too important if difficult).
I've tried changing the carousel controls as per but I can't quite figure it out: http://twitter.github.com/bootstrap/javascript.html#carousel
From:
<script type="text/javascript">
$('.carousel').carousel({
interval: 3000
})
</script>
to:
<script type="text/javascript">
$('.carousel').carousel({
interval: false
}).carousel(1).delay('500');
</script>
when I do the latter option, the carousel rolls continuously once I press an arrow, but not at all normally.
I've included my carousel markup. Hope this helps. Anyone with a bigger brain than my little pea have any ideas or pointers?
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
<div class="item active">
<a href="#" class="featurette">
<img class="featurette-image pull-right" width="200" height="200" src="en_200x200.png">
<h2 class="featurette-heading">Heading 1</h2><p class="lead muted">Strapline 1</p>
</a>
</div>
<div class="item">
<a href="#" class="featurette">
<img class="featurette-image pull-right" width="200" height="200" src="cloud.png">
<h2 class="featurette-heading">Heading 2</h2>
<p class="lead muted">Strapline 2</p>
</a>
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
<hr>
</div><!-- /.carousel -->