容器div在IE中使用jquery show()时未展开
我一直在构建一个包含可扩展部分的表单。使用jquery的hide()和show()方法切换div 在Chrome和FF中一切正常,但在IE中,包含其他分区的主分区在内部打开时无法展开以适应 我尝试过更改各种属性,例如设置容器div的高度容器div在IE中使用jquery show()时未展开,jquery,internet-explorer,html,show-hide,Jquery,Internet Explorer,Html,Show Hide,我一直在构建一个包含可扩展部分的表单。使用jquery的hide()和show()方法切换div 在Chrome和FF中一切正常,但在IE中,包含其他分区的主分区在内部打开时无法展开以适应 我尝试过更改各种属性,例如设置容器div的高度 <div id='form'> <form id='form2'> // some form fields <div id="section1" style="display: none"&
<div id='form'>
<form id='form2'>
// some form fields
<div id="section1" style="display: none">
// more fields
</div>
<div id="section2" style="display: none">
// more fields
</div>
</form>
</div>
在Chrome或FF中查看,您将看到我希望它的行为-在IE中,它只是不玩球
下面是css:(只有主div和正在扩展的一个)
所以,让我们看看你们这些疯狂的程序员是否能帮我;)谢谢你的帮助。第一节和第二节是浮动的吗?
如果是,则在可扩展div之后添加一个带有clear:的div.节1和节2是否浮动?
如果是这样,请在可展开div之后添加一个带有clear:tware的div。的div!我知道一旦我发布了所有这些信息,它就会跳进我的脑海 问题是,我想要扩展的容器div使用CurvyCorner将其角弯曲-这意味着IE无法重新渲染它,我猜,所以我只是进行了舍入,并在下面添加了另一个具有圆角的div
感谢那些帮助过我的人。解决了这个问题!我知道一旦我发布了所有这些信息,它就会跳进我的脑海 问题是,我想要扩展的容器div使用CurvyCorner将其角弯曲-这意味着IE无法重新渲染它,我猜,所以我只是进行了舍入,并在下面添加了另一个具有圆角的div
感谢帮助过我们的人。表格的第1部分和第2部分还有哪些其他样式?此外,考虑使用<代码> <代码>而不是<代码> >代码>内部窗体。此外,考虑使用<代码> <代码>而不是<代码> <代码>内部窗体。
var toggleMinus = 'wp-content/uploads/2010/01/delete.png';
var togglePlus = 'wp-content/uploads/2010/01/add.png';
$("#openelec").click(function() // when button clicked
{
var toggleSrc = $(this).attr('src'); // check which icon is shown
if(toggleSrc == toggleMinus) // if it is a minus
{
$(this).attr('src', togglePlus); // change to plus
$(".elecsite").slideUp(1500); // close the div
}
else
{
$(this).attr('src', toggleMinus); // change to minus
$(".elecsite").slideDown(1500); // open the div
};
});
#form{
width: 770px;
background: #DDEEEE;
padding: 10px;
border-top: 1px solid #c60;
height: auto;
text-align: left;
-moz-border-radius-bottomleft: 10px;
-webkit-border-bottom-left-radius: 10px;
-moz-border-radius-bottomright: 10px;
-webkit-border-bottom-right-radius: 10px;
}
.elecsite{
width: 760px;
height: auto;
background: #EFE0E0;
padding: 5px;
border-bottom: 1px solid #DF7401;
float: left;
}