我在实现 twitter bootstrap 的手风琴功能时遇到了麻烦,想知道是否有人可以看看并指出它为什么不起作用:
<div class="accordion">
<div class="accordion-group" style="display:none" id="View" data-bind="foreach:Types">
<div class="accordion-heading">
<div class="text_x-large header"><span data-bind="text:Name()"></span>
<span class="icon-plus-sign-alt accordion-toggle"></span>
</div>
</div>
<div class="accordion-body collapse in" data-bind="template: { name: 'list', foreach: $data.Users }"></div>
</div>
</div>
最后一个 div 调用以下内容放置在具有类折叠的 div 中:
<script type="text/html" id="list">
<div class="accordion-inner">
<h3 id="letter" data-bind="text: Letter"></h3>
<div class="smoke_hover" >
<div class="list_item">
<span class="h2"><small data-bind="text: Name"></small></span>
</div>
</div>
</div>
</script>