The Gallery is deprecated. No new Gallery components may be submitted, and modifying existing components is disabled. For more information please read the Gallery Deprecation blog post. This is a static snapshot of the Gallery for archive purposes.
See 1 more by this user. Created: 04/10/10
Last CDN Push: 06/2/10
Build Tag: gallery-2010.06.02-18-59
Project: YUI 3
License: YUI BSD
YUI Version: 3.1.1
Free for use.
A very basic treeview that will take nested (un)ordered lists and give it very basic treeview skin and functionality. It's aiming to be as little as possible (js ~ 1.1k) and not do too much!
You'll need the css for it too, available here, http://github.com/yui/yui3-gallery/raw/master/build/gallery-treeviewlite/assets/skins/sam/gallery-treeviewlite.css for example, and the sprite that contains the + and - images - the same sprite as the YUI2 treeview.
Renders nested lists as a treeview. Start with html like this - note the span tags wrapping the text in each node - these are required.
<ol id="myOlList">
<li><span>item 1</span></li>
<li><span>item 2</span>
<ul>
<li><span>item 2.1</span></li>
<li><span>item 2.2</span></li>
</ul>
</li>
<li><span>item 3</span></li>
</ol>
<script src="http://yui.yahooapis.com/3.1.1/build/yui/yui-min.js"></script>
YUI({
//Last Gallery Build of this module
gallery: 'gallery-2010.06.02-18-59'
}).use('gallery-treeviewlite', function(Y) {
Y.one( "#myOlList" ).plug( Y.Plugin.TreeviewLite );
});
Subject | Author | Date |
---|---|---|
problem with treeviewlite and dynamically created lists | jumpinggrendel | 11/10/10 |
Re: problem with treeviewlite and dynamically created lists | Matt Parker | 11/11/10 |
All code on this site is licensed under the BSD License unless stated otherwise.