Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A Mootools class that creates a Tweakable tree modoule that uses an acordion effect
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
Demo
Docs
Source
README.md
acord-sc.png
package.yml

README.md

TreeAcordion

this class takes a tree structure (by element id of by a passed element) and makes it tweakable with an Acordion effect.

Screenshot

How to use

Simple usage without any options:

#JS
var list = new TreeAcordion($('root'));

Usage with all options:

#JS
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:

#HTML
<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>

Events

  • acord-opened : fired when a branch is opened. returns the opened branch
  • acord-closed : fired when a branch is closed. returns the closed branch
  • handled-opened : fired when a handled branch is opened. returns the handler
  • handled-closed : fired when a handled branch is closed. returns the handler
Something went wrong with that request. Please try again.