开发者

How to deep link YUI 3 Tabview?

开发者 https://www.devze.com 2023-02-20 00:09 出处:网络
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

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

精彩评论

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