Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • saif 68 posts 88 karma points
    Jul 09, 2012 @ 16:21
    saif
    0

    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>  

  • Greg McMullen 49 posts 195 karma points
    Oct 30, 2012 @ 14:27
    Greg McMullen
    0

    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.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies