87,910
社区成员
发帖
与我相关
我的任务
分享
<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"
});
jQuery( "#acc" ).accordion({
active: 1 ,
header: "h1",
heightStyle: "auto"
});
jQuery('#acc div').css('height','auto');
jQuery( "#acc" ).accordion({
active: 1 ,
header: "h1",
heightStyle: "auto"
});
var heightStyle = jQuery( "#nvaacc" ).accordion( "option", "heightStyle" );
jQuery('#acc div').css('height','auto');
用上面的代码试了一下,heightStyle就是auto