开发者

YUI3 Tabview Initialization

开发者 https://www.devze.com 2023-01-07 12:14 出处:网络
I\'m trying to setup a simple tabview from existing markup, ala this example from the YUI developer network. Works like a charm. However, my question is, how do you designate which of the开发者_StackO

I'm trying to setup a simple tabview from existing markup, ala this example from the YUI developer network. Works like a charm. However, my question is, how do you designate which of the开发者_StackOverflow社区 tabs should be initially selected? Can it be done via the existing markup, or is the only way via javascript? This isn't really addressed in the examples or documentation that I could see...


You ca select child by calling selectChild(index)

var tabview = new Y.TabView({srcNode:'#demo'});
tabview.render();
tabview.selectChild(1);

Hope this helps. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消