Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 推特引导3手风琴_Javascript_Jquery_Css_Twitter Bootstrap 3 - Fatal编程技术网

Javascript 推特引导3手风琴

Javascript 推特引导3手风琴,javascript,jquery,css,twitter-bootstrap-3,Javascript,Jquery,Css,Twitter Bootstrap 3,我正在尝试将twitter bootstrap3手风琴集成到我的web项目中。我已经在页面中显示了手风琴,但手风琴的折叠和扩展似乎无法正常工作。如果有人能告诉我我做错了什么,我将不胜感激 这是我的密码 <div class="panel-group" id="accordion" data-bind="foreach:{data:products,afterRender:expand}"> <div class="panel panel-default"> <

我正在尝试将twitter bootstrap3手风琴集成到我的web项目中。我已经在页面中显示了手风琴,但手风琴的折叠和扩展似乎无法正常工作。如果有人能告诉我我做错了什么,我将不胜感激

这是我的密码

<div class="panel-group" id="accordion" data-bind="foreach:{data:products,afterRender:expand}">
<div class="panel panel-default">
    <div class="panel-heading">
        <a data-toggle="collapse" class=" panel-title colorgrey" data-parent="#accordion" data-bind="attr:{href:link}">
            <h4 >
                <span data-bind="text:product"></span>
                <span id="arrowicon" class="glyphicon glyphicon-large glyphicon-chevron-right pull-right orange paddingbottom"></span>
            </h4>
        </a>
    </div>
    <div data-bind="attr:{id:target},foreach:recipes" class="panel-collapse collapse">
        <div class="panel-body">
            <span data-bind="text:RecipeTitle"></span>
            <span id="arrowicon" class="glyphicon glyphicon-large glyphicon-chevron-right pull-right orange paddingbottom"></span>
        </div>
    </div>
</div>

您能为这个创建JSFIDLE吗?@ndcweb当然可以。如果“工作不正常”,你的意思是它什么也没做,也许你忘记了引导JS和/或jQuery?@ParrotMac:我的意思是手风琴的切换功能不工作。我把手风琴放在书页上了。但是它总是处于展开模式,即使我点击accordion头,它也不会关闭cweb:我无法在bootply上的jsfiddle上实现这一点,正如您所看到的,我在knockout的帮助下应用了一些数据绑定。