this class takes a tree structure (by element id of by a passed element) and makes it tweakable with an Acordion effect.
Simple usage without any options:
var list = new TreeAcordion($('root'));
Usage with all options:
var list = new TreeAcordion('root',{
branchClass :'branch',
openerClass: 'handle',
branchContainer : 'li',
acordOpenFunction : function(el,height){/* ... */},
acordCloseFunction : function(el,height){/* ... */},
multiple: true,
debug : false,
rtl : true
});
An example of an HTML strcture to work with:
<ul id='root'> <!-- root element /-->
<li> <!-- branch container /-->
<a href='javascript:;' class='handle'>
handle</a> <!-- handle /-->
<ul class ='branch'> <!-- a branch /-->
<li><ul class='branch'><!-- .... /--></ul></li>
</ul>
</li>
</ul>
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus