[英]Close all the items in accordion menu
I need all the menus to be closed by default in accordion menu. 我需要在手风琴菜单中默认关闭所有菜单。 Here is the script which I am using, here 1st tab will be opened by default.
这是我正在使用的脚本,默认情况下将打开第一个选项卡。 How do I get every tab closed by default
如何在默认情况下关闭每个选项卡
<script type="text/javascript">
$('#accrdion').accordion();
</script>
Assuming you're using the jQuery-UI accordion , you can collapse all by enabling collapsible
, and then using the method activate
with a value of false
, like this: 假设您正在使用jQuery-UI手风琴 ,您可以通过启用
collapsible
,然后使用值为false
的方法activate
来折叠所有,如下所示:
// construct the accordion
$('#accrdion').accordion({
collapsible: true
});
// collapse all somewhere else
$('#accrdion').accordion('activate', false);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.