[Solved] Twitter Bootstrap theme carousel issue
Posted: Tue Jan 14, 2014 7:26 pm
Hello, I'm using the twitter bootstrap theme which work really well apart from one thing. There is a 5 second pause before the first carousel image loads, this gap is equal to the interval set in the bootstrap.js file (my interval is 5000 = 5s).
I have narrowed the problem down to this - the first slide should have a class 'active', the code is in the template (<div class="item{if $slide@first} active{/if}">) but it is not being applied:
Does anybody know why this might be? Im using the latest CMS version, and the class is working on the demo site: http://i-arts.eu/bootstrap
I have narrowed the problem down to this - the first slide should have a class 'active', the code is in the template (<div class="item{if $slide@first} active{/if}">) but it is not being applied:
Code: Select all
{*<!-- Carousel
================================================== -->*}
<div id="myCarousel" class="carousel slide">
<div class="carousel-inner">
{foreach $output_header as $slide}
{if !empty($slide.2)}
<div class="item{if $slide@first} active{/if}">
<img src="{$slide.2}" alt="{$slide.0}">
{if !empty($slide.0) || !empty($slide.1)}
<div class="container">
<div class="carousel-caption">
{if !empty($slide.0)}<h1>{$slide.0}</h1>{/if}
{if !empty($slide.1)}<p class="lead">{$slide.1}</p>{/if}
{if !empty($slide.3)}<a class="btn btn-large btn-primary" href="{cms_selflink href=$slide.3}">Read more</a>{/if}
</div>
</div>
{/if}
</div>
{/if}
{/foreach}
</div>
</div>
<a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
</div>
<!-- /.carousel -->