tabs.html revision 90a4a68f29f441573560c73239959e79a9ddb64c
<html>
<head>
<title>Tabs</title>
<style>
ul, li {
margin: 0;
padding: 0;
}
</style>
</head>
<body class="yui3-skin-sam">
<h1>Tabs</h1>
<div id="demo">
</div>
<div id="demo2">
<ul>
<li><a>foo</a></li>
<li><a>bar</a></li>
<li><a>baz</a></li>
</ul>
<div>
<div>foo content</div>
<div>bar content</div>
<div>baz content</div>
</div>
</div>
</body>
<script type="text/javascript">
YUI({filter: 'raw'}).use('tabview', function(Y) {
var tabview = new Y.TabView({
boundingBox: '#demo',
children: [{
label: 'tab 1',
content: 'tab 1 content'
}, {
label: 'tab 2',
content: 'tab 2 content',
selection: 1
}, {
label: 'tab 3',
content: 'tab 3 content'
}]
});
//tabview.selectChild(0);
//tabview.remove(0);
//tablist.get('selection').next().set('selected', 1);
var tabview2 = new Y.TabView({
contentBox: '#demo2'
});
label: 'foobar',
content: 'foobar content'
});
//tabview2.add(tabview.item(1));
});
</script>
</html>