Semantic-UI选项卡历史记录激活选项卡

问题描述 投票:0回答:1

我正在使用Semantic中的菜单对象,如果我将选项卡历史状态设置为true,它将始终加载激活了选项卡的页面内容,尽管没有任何选项卡处于活动状态。完整的上下文源是一个很大的麻烦,但发现here。正如您所看到的,尽管未在选项卡内容的代码中包含active类,但它会在第一个“关于”选项卡打开时加载: <div class="ui tab segment" data-tab="about">

一些相关的位:

readyState函数:

$(document).ready(function(){
$('.links.menu .item').tab({
        history : true,
        historyType : 'hash',
    });
    $('.links.menu').transition({
        animation : 'fade down',
        duration : '1s'
    });
});
javascript jquery html5 tabs semantic-ui
1个回答
0
投票

the documenation中,据说“Tabs使用Asual的地址库来提供跨浏览器推送状态支持。这是历史记录正常工作的选项卡所必需的依赖项。”你是否在依赖项中包含了the library

© www.soinside.com 2019 - 2024. All rights reserved.