开发者

YUI3 Tabview Initialization

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜