简体   繁体   English

难以实现twitter bootstrap手风琴

[英]trouble implementing twitter bootstrap accordion

I am having trouble implementing twitter bootstrap's accordion feature and wondered if someone could take a look and point out why it isn't working: 我在实现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>

the last div calls the following to be placed within the div with class collapse: 最后一个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>

I rearranged your setup to be more like the collapse example from the bootstrap docs and it worked like a charm 我重新排列了您的设置,使其更类似于引导文档中collapse示例,并且它的工作原理像一个魅力

Here is the fiddle: http://jsfiddle.net/Jgdmq/ 这是小提琴: http : //jsfiddle.net/Jgdmq/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM