Twitter bootstrap collapse issue in Internet Explorer

守給你的承諾、 提交于 2020-01-04 02:43:08

问题


I am using Twitter Bootstrap responsive css in my web application.This is used in HTML Template with MustacheJS I have "collapse" and that is not working properly in IE-9 This is the code

<div class="accordion-heading">
<a class="accordion-toggle" data-parent="#divInsurerList" data-toggle="collapse" href="#collapseOne{{_id}}">
    <span rel="tooltip" title="DELETE"><label id="insDeleteView" class="icon-trash"></label></span>
    <span rel="tooltip" title="EDIT"><label id="insUpdateView" class="icon-edit"></label></span>

            <divclass="" style="display: table-cell">{{Name}}</div>
</a>
</div>
<div id="collapseOne{{_id}}" class="accordion-body collapse" style="height: 0px; ">
<div class="accordion-inner">
    <div class="row-fluid">
        <div class="span2">Name</div>
            {{#isEdit}}<div class="span8"><input id="Name" class="span12" type="text" value="   {{Name}}" /><label id="updateins"></label></div>  <div class="span1"><sup style="color: #a5072e"><b>*</b></sup></div><br />{{/isEdit}}
            {{^isEdit}}<div class="name span9">{{Name}}</div>
        <br />{{/isEdit}}
    </div>
    {{#isEdit}}<button id="insSaveView" class="btn btn-primary">Save</button>&nbsp;
    <button id="insCancel" class="btn">Cancel</button>{{/isEdit}}
</div>
</div>

There is a DELETE and EDIT icon in <div class="accordion-heading"> on click of each of these icon,either a deleteTemplate or an editTemplate are supposed lo load and accordion expands. so that <div id="collapseOne{{_id}}" class="accordion-body collapse" style="height: 0px; "> becomes <div id="collapseOne{{_id}}" class="accordion-body in collapse" style="height: auto; "> (class "in" and height:auto) this is working fine in chrome and firefox, issue is in IE. That is on clicking EDIT icon content in accordion is not "opening" Collapse was initially broken in IE which i fixed by modifying bootstrap Css as shown

.collapse {
position: relative;
height: 0;
overflow: hidden;
//overflow: visible \9;
-webkit-transition: height 0.35s ease;
 -moz-transition: height 0.35s ease;
   -o-transition: height 0.35s ease;
      transition: height 0.35s ease;
}

Can anyone say why accordion is not working on "click" of EDIT icon?


回答1:


I don't believe // comments work in CSS. Use /* comment */



来源:https://stackoverflow.com/questions/13510840/twitter-bootstrap-collapse-issue-in-internet-explorer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!