jquery:三级垂直菜单
我已经花了几个小时寻找 3 级垂直手风琴菜单。像这样的东西: http://sandbox.scriptiny.com/javascript-accordion/index.html
一些非常简单的东西就足够了,但我无法让任何东西与 3 个级别一起工作。谁能给我提供一个 jquery 片段来帮助我开始?我尝试过使用
$('li').click(function(){
$(this).children('ul').children('li').toggle();
});
,但它也隐藏了子菜单,而不仅仅是当前的子菜单。谢谢
I've been looking around for a couple of hours for a 3 level vertical accordion menu. Something like this: http://sandbox.scriptiny.com/javascript-accordion/index.html
Something really simple is enough, but i cant get anything to work with 3 levels. Can anyone provide me with a jquery snippet to get me started? I've tried using
$('li').click(function(){
$(this).children('ul').children('li').toggle();
});
but it hides the submenu as well, not just the current childrens. Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从头开始的示例:
演示: http://jsfiddle.net/aCaEG/
example from scratch:
demo: http://jsfiddle.net/aCaEG/
检查 ui.accordion 看看是否对您有帮助。
在我看来,不要尝试做已经存在的事情。
check ui.accordion and see if helps you.
in my opinion, dont try to do something that already exist.