How to make nested vertical menu with jQuery accordion?

ⅰ亾dé卋堺 提交于 2020-04-18 07:26:18

问题


Can anyone point me to a good example on how to implement nested vertical menu using jQuery accordion? Something like here (at the left of the page, starting from third item), but nested. There is no example of nested structure in Accordion docs on some reason.

Or may be there is a good jQuery component on organizing vertical nested menus I somehow missed (whatever based, not necessarily accordion)? I beleive there should be one. Can you suggest some with good initial design and preferably easily skinnable?


回答1:


i made one by myself a time ago, you could use it : the example in the web itself : http://www.corbins.cat/ the plugin source : http://www.corbins.cat/lib/js/accordion.js

edit : i updated my plugin a little bit

http://gist.github.com/343543

give it a try, is nested yes, you should make html like that

<ul>
  <li><h4 class="trigger">title one</h4>
   <ul>
      <li><h4> class="trigger">title one.one</h4>
         <ul>
            <li> item one.one.one</li>
            <li> item one.one.two</li>
            <li> item one.one.three</li>
         </ul>
     <li>item one.two</li>
   </ul>
 <li>item two</li>
</ul>

let me know how it works for you! :)



来源:https://stackoverflow.com/questions/2514516/how-to-make-nested-vertical-menu-with-jquery-accordion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!