Coder Social home page Coder Social logo

mootree's Introduction

mooTree

Screenshot

mooTree is a mootools plugin designed to create a navigation tree starting from an html unordered list (ul tag).
It adds automatically expand and collapse controllers and can manage different initial condition:

  • item selected (and shown)
  • item expanded (use of html5 data attributes)
  • top tree expanded
  • tree level expanded Every aspect is fully customizable through css. A base css is provided in the Demo folder.

Tests

Run the tests provided in the Test folder

How to use

mooTree requires

  • core/1.3 Core, Array, Function, Event, Class, Element, Element.Style, Element.Event

Include mootools framework and mooReadAll plugin

<script src="path-to-mootools-framework" type="text/javascript"></script>
<script src="path-to-mooTree-js" type="text/javascript"></script>

Include mooTree stylesheet

<link href="path-to-mooTree-css" type="text/css" rel="stylesheet" />

Example code

Javascript:

window.addEvent('domready', function() {
	var mt_instance = new mooTree('my_list_id', {collapse:true, expand_top: true});
}

Html:

<ul id="my_list_id">
	<li>First voice init expanded
		<ul>
			<li>First under first init shown
				<ul>
					<li>First under first under first init shown</li>
					<li>Second under first under first init shown</li>
				</ul>
			</li>
			<li>Second under first init shown
				<ul>
					<li>First under second under first init hide</li>
				</ul>
			</li>
		</ul>
	</li>
	<li>Second voice init collapsed
		<ul>
			<li>First under second init not hide</li>
		</ul>
	</li>

</ul>

For more demos please visit the mooReadAll demo page at http://www.abidibo.net/projects/js/mooTree/demo

Screenshots

Screenshot Screenshot

Links

The project page: http://www.abidibo.net/projects/js/mooTree
The documentation page: http://www.abidibo.net/projects/js/mooTree/doc
The demo page: http://www.abidibo.net/projects/js/mooTree/demo

Please report bugs, errors and advices in the github project page: http://github.com/abidibo/mooTree

mootree's People

Contributors

abidibo avatar

Stargazers

 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.