开发者

jquery heirarchial accordion tree

I need a suggestion regarding how I can make an accordion tree hierarchical. There are 开发者_开发技巧many plugins available, but they do not fit my requirement.

My requirement is as follows: Suppose I click on my child node, then that should become the parent node for the rest of its child elements, and if I click on it again then it should display its child's parent element.

I want to start by using jQuery.


Unless I am misunderstanding, you should be able to nest the JqueryUI accordions. If you want to make it appear as a tree, you can change the JQueryUI css.

See here: http://jsbin.com/adole3/edit

However, note that with an accordion, only one section of the accordion can be open at a time. If you want several sections to be open at once, view the code under the note on this page: http://docs.jquery.com/UI/Accordion

Here is an implementation (no styles) from the above: http://jsbin.com/enika3/2/edit

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜