Twitter bootstrap 带把手的引导转盘.js

Twitter bootstrap 带把手的引导转盘.js,twitter-bootstrap,carousel,handlebars.js,handlebarshelper,Twitter Bootstrap,Carousel,Handlebars.js,Handlebarshelper,我正在使用handlebar.js获取转盘数据。我想知道如何使用手柄从旋转木马获取当前活动项目 <script id="template" type="text/x-handlebars-template"> {{#each}} <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> <!-- Wrapper fo

我正在使用handlebar.js获取转盘数据。我想知道如何使用手柄从旋转木马获取当前活动项目

<script id="template" type="text/x-handlebars-template">
    {{#each}}
          <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">

          <!-- Wrapper for slides -->
          <div class="carousel-inner">
            {{#each}}
                {{this.title}}
            {{/each}}
          </div>

          <!-- Controls -->
          <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
            <span class="glyphicon glyphicon-chevron-left"></span>
          </a>
          <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
            <span class="glyphicon glyphicon-chevron-right"></span>
          </a>

          <!-- Indicators -->
          <ol class="carousel-indicators">
            {{#each}}
                <li data-target="#carousel-example-generic" data-slide-to="{{this.id}}" {{#ifEquals this.id 1}} class="active" {{/ifEquals}}></li>
            {{/each}}
            <span id="number"> </span> 
          </ol>
        </div> <!-- Carousel -->
    {{/each}}
</script>

你知道如何使用手柄检查当前活动的转盘吗?

看看carousel的引导程序3,它的slide.bs.carousel和not slided事件。我对它们很熟悉。我正在寻找一种方法,以获得积极的元素使用把手。我是新手,想了解更多。并搜索@index。您可以使用index并将类设置为活动的第一个元素。我希望这是您想要的。我想显示当前元素是否处于活动状态的索引。我怎么检查这个?