<div id="acc">
<h1>title1</h1>
<div>
<h2>t2</h2>
</div>
<h1>title2</h1>
<div>
<h2>t4</h2>
</div>
</div>
jQuery( "#acc" ).accordion({
active: 1 ,
header: "h1",
heightStyle: "auto"
});
但是打开firebug看,哪个panel的div中都有style=height:15px的设置,heightStyle的三个:auto、fill、content三个都换了,都是不行,总之height就是不会设置为auto(ie下显示也不正常)
现在我将代码改成了:
jQuery( "#acc" ).accordion({
active: 1 ,
header: "h1",
heightStyle: "auto"
});
jQuery('#acc div').css('height','auto');
强制在完成accordion操作后将div的height设置为auto,显示就正常的,求解啊
4 个解决方案
#1
jQuery( "#acc" ).accordion({
active: 1 ,
header: "h1",
heightStyle: "auto"
});
var heightStyle = jQuery( "#nvaacc" ).accordion( "option", "heightStyle" );
jQuery('#acc div').css('height','auto');
用上面的代码试了一下,heightStyle就是auto
#2
结贴求挽尊!!
#3
heightStyle :'content'
#4
楼上高手,成果引用了,谢谢!
#1
jQuery( "#acc" ).accordion({
active: 1 ,
header: "h1",
heightStyle: "auto"
});
var heightStyle = jQuery( "#nvaacc" ).accordion( "option", "heightStyle" );
jQuery('#acc div').css('height','auto');
用上面的代码试了一下,heightStyle就是auto
#2
结贴求挽尊!!
#3
heightStyle :'content'
#4
楼上高手,成果引用了,谢谢!