开发者

How to deep link YUI 3 Tabview?

Im using YUI3 and wou开发者_如何转开发ld like to deep link my tabs. I used tabview + history from YUI. how do i change the value for the url parameter

/#tab-2 replace to /#tab-description

Thanks in advance.


You can use:

http://developer.yahoo.com/yui/3/api/HistoryHash.html

It has a setHash method which can do that work for you. Under the hood, it just changes what you have above. Ideally, you'll have some sort of infrastructure in history to listen for the hash change events (http://developer.yahoo.com/yui/3/api/HistoryBase.html, history:change) to detect the change and perform you application code)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜