如何让手风琴在所有菜单关闭的情况下加载? [英] How do I get my accordion to load with all the menus closed?

查看:85
本文介绍了如何让手风琴在所有菜单关闭的情况下加载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图按照这里的例子

http://twitter.github.com/bootstrap/javascript.html#collapse



我在这里放置了一个模型

p>

http://jsfiddle.net/gqe7g/



加载行为很奇怪。它显示Menu1然后折叠它,然后显示Menu2和Menu3。我希望一切都打开崩溃。我尝试了以下方法,但没有成功:

$ p $ $'''accordion'。collapse({hide:true})


解决方案

替换

  $崩溃()( 崩溃)。; 
$('#accordion')。collapse({hide:true})

用:

  $('#collapseOne')。collapse(hide); 

应该可以做到。我认为第一个默认开启,这一行将它关闭。


I'm trying to follow the example here

http://twitter.github.com/bootstrap/javascript.html#collapse

I have placed a mockup here

http://jsfiddle.net/gqe7g/

Loading behavior is strange. It shows Menu1 then collapses it then shows Menu2 and Menu3. I would like everything to open collapsed. I have tried the following without success

$('#accordion').collapse({hide: true})

解决方案

Replacing

$(".collapse").collapse();
$('#accordion').collapse({hide: true})

with:

$('#collapseOne').collapse("hide");

should do the trick. I think the first one is toggled on by default and this one line switches it off.

这篇关于如何让手风琴在所有菜单关闭的情况下加载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆