且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

打开带有URL的JQuery选项卡,并在选项卡单击时向URL添加哈希

更新时间:2023-10-28 22:18:58

我最终使用了Asual的JQuery Address插件.我做了以下事情:

I ended up using the JQuery Address plugin from Asual. I did the following:

    // For forward and back
    $.address.change(function(event){
        $("#main_tabs").tabs( "select" , window.location.hash );
    });

    // when the tab is selected update the url with the hash
    $("#main_tabs").bind("tabsselect", function(event, ui) { 
        window.location.hash = ui.tab.hash;
    });

希望这对某人有帮助! 谢谢.

Hopefully this helps someone! Thank you.