0

我已经通过以下方式初始化了手风琴。

<script>
$(function()
    $( "#accordion" ).accordion({
    autoHeight:false});
});
</script>

一切正常,除了以下内容在扩展包含比第一个更高的部分时没有向下移动。

现场查看的网址是http://thephpcode.com/index.php/web/setting_issue

尝试展开最后一部分并查看手风琴下方的按钮不向下移动。它出现在手风琴显示器的顶部。如何解决这个问题?

4

2 回答 2

0

解决方案是:

$( "#accordion" ).accordion({
heightStyle: "content"
});
于 2012-10-23T07:55:17.057 回答
0

你也可以试试这个插件http ://accordion-cd.blogspot.com/

如果您希望默认选择特定项目。还有许多选项可用于定制您的要求。

传入插件的参数:

heading  :  null  //mandatory to provide Heading tag to attach event
content  :  null  //mandatory to provide Content to show/hide
headingEvent  : "click"   //Attach Event
active : 0   //By default visible element
callapsAll  :  false   //to hide all on page load
expandAll  :  "expandAll"   //Element name on Expand All Functionality attached
collapsAll  :   "collapsAll"   //Element name on Collapse All Functionality attached
headingClass  :  "accordion-header"   //Accordion Heading Class
contentClass  :  "accordion-content"   //Accordion Content Class
于 2014-05-14T12:57:45.143 回答