jQuery UI Tabs后退按钮历史记录 [英] jQuery UI Tabs back button history
问题描述
任何人都可以使用后退按钮来获取jQuery UI Tabs 3(最新版本)吗?
Has anyone been able to get jQuery UI Tabs 3(Latest version) working with the back button?
我的意思是,如果用户单击后退"按钮,则应该转到页面上以前访问的标签,而不是其他页面.
I mean if the user hits the back button they should go to the previously visited tab on the page, not a different page.
历史记录插件听起来像它可以工作,但我似乎无法使其与 Ajax加载的标签页.
The history plug in sounds like it can work, but i cant seem to make it work with ajax loaded tabs.
如果有人成功完成了这项工作,将不胜感激,谢谢!
If anyone has managed to make this work, it would be deeply appreciated, thanks!
推荐答案
我也遇到了这个问题.使用 http://www.asual.com/jquery/address/
I just ran into this as well. Its really easy with the jquery address plugin here http://www.asual.com/jquery/address/
选项卡的演示似乎有点复杂.我就是这样做的:
The demo for tabs seemed a bit over complicated. I just did this:
$('document').ready(function() {
// For forward and back
$.address.change(function(event){
$("#tabs").tabs( "select" , window.location.hash )
})
// when the tab is selected update the url with the hash
$("#tabs").bind("tabsselect", function(event, ui) {
window.location.hash = ui.tab.hash;
})
});
这篇关于jQuery UI Tabs后退按钮历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!