`
wh8766
  • 浏览: 34897 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

Semantic页面多Tab冲突的问题

 
阅读更多
在Semantic框架下可以,一个页面中可以定义多个Tab:http://zh.semantic-ui.com/introduction/overview.html

但是需要这么写:

$("#micro-query-container").find(".menu .item").tab({
    context : '#micro-query-container',
    history : false
});

如果启用了history,tab的浏览历史将通过URL#tabName的方式被记录下来,在Semantic中的处理方式是用$.address.bind(xxx),所以事件处理是一个全局的,导致后来的tab覆盖以前的tab,造成冲突。

if(settings.history) {
  ...
  $.address
    .unbind('change')
    .bind('change', module.event.history.change)
  ;
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics