index.mustache revision 6f22811f3148a8875c32d1e4a34f19dc1b8579d4
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <h2 id="anatomy">Anatomy of a TabView</h2>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <p>A <code>TabView</code> consists of a list of links that target a content element.</p>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <p>The basic markup needed to create from HTML is the following:</p>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy<div id="demo">
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <li><a href="#foo">foo</a></li>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <li><a href="#bar">bar</a></li>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <li><a href="#baz">baz</a></li>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <div id="foo">foo content</div>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <div id="bar">bar content</div>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <div id="baz">baz content</div>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy<p>After a <code>TabView</code> is rendered, the final markup becomes:
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy<div class="yui3-widget yui3-tabview">
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <div id="demo" class="yui3-tabview-content">
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <ul class="yui3-tabview-list">
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <li class="yui3-tab yui3-widget yui3-tab-selected"><a href="#foo" class="yui3-tab-label yui3-tab-content">foo</a></li>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <li class="yui3-tab yui3-widget"><a href="#bar" class="yui3-tab-label yui3-tab-content">bar</a></li>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <li class="yui3-tab yui3-widget"><a href="#baz" class="yui3-tab-label yui3-tab-content">baz</a></li>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <div class="yui3-tabview-panel">
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <div id="foo" class="yui3-tab-panel">foo content</div>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <div id="bar" class="yui3-tab-panel">bar content</div>
d583b39bfb4e2571d3e41097c5c357ffe353ad45John Wren Kennedy <div id="baz" class="yui3-tab-panel">baz content</div>
var tabview = new Y.TabView({
render takes an optional container to render into, or defaults to the <code>body</code> element.</p>
var tabview = new Y.TabView({
tabview.render('#demo');
<td>Normal change event signature (<code>newVal</code>, <code>prevVal</code>, etc). When dragging, extra event property <code>ddEvent : (drag:drag event)</code> is added</td>
<p>This is not an exhaustive list. See the <a href="/yui/3/api/module_<?php echo($section); ?>.html">API docs</a> for a complete listing.</p>