I am using xslt to display images and wrapped with bootstrap carousel. The following code is working fine except "active item" div. I tried to figure out but no luck. Following code displays active image and first image from loop.
If I comment "active item" div then on page load it displays nothing but once I click on left or right button it works perfectly.
Please could you help me how can I display an active image on page load and images in loop.
<div class="span6">
<div class="hero-unit">
<div id="myCarousel" class="carousel">
<div class="carousel-inner">
<div class="active item">
<img src="/Images/item1.png" />
</div>
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
From my experience with Bootstrap, you'll have to only have "active" on the first item. You might want to try and putting an if/choose statement to select the first & otherwise for each subsequent item.
bootstrap Carousel active item problem
Hi All,
I am using xslt to display images and wrapped with bootstrap carousel. The following code is working fine except "active item" div. I tried to figure out but no luck. Following code displays active image and first image from loop.
If I comment "active item" div then on page load it displays nothing but once I click on left or right button it works perfectly.
Please could you help me how can I display an active image on page load and images in loop.
<div class="span6">
<div class="hero-unit">
<div id="myCarousel" class="carousel">
<div class="carousel-inner">
<div class="active item">
<img src="/Images/item1.png" />
</div>
<xsl:for-each select="$currentPage/* [@isDoc and string(umbracoNaviHide) != '1']">
<div class="item">
<img src="{uploadPhoto}" alt="" />
</div>
</xsl:for-each>
</div>
<a class="carousel-control left" href="#myCarousel" data-slide="prev"><img src="/Images/arrow_next_left.png" alt="" /></a>
<a class="carousel-control right" href="#myCarousel" data-slide="next"><img src="/Images/arrow_next_right.png" alt="" /></a>
</div>
</div>
</div>
From my experience with Bootstrap, you'll have to only have "active" on the first item. You might want to try and putting an if/choose statement to select the first & otherwise for each subsequent item.
Unfortunately I have no examples. Sorry.
is working on a reply...