【问题标题】:Selecting Tabular menu on Bootstrap takes back to parent link在 Bootstrap 上选择表格菜单会返回父链接
【发布时间】:2016-07-06 16:16:53
【问题描述】:

我的项目设置在这个本地链接中:

localhost:12345/index.html#/BookCollection

在这个页面中有 3 个来自 Bootstrap 的 Tab 组件。最近、过去和未来

当我点击这些标签中的任何一个时,我会返回:

localhost:12345/index.html#/

本来应该是这样的:

localhost:12345/index.html#/BookCollection#Recent

另外两个选项卡链接是:

localhost:12345/index.html#/BookCollection#Past

localhost:12345/index.html#/BookCollection#UpComing

请注意,我不能更改以下链接结构:

localhost:12345/index.html#/BookCollection

这是我正在使用的 Bootstrap 组件:

 <ul class="nav nav-tabs">
      <li class="active"><a data-toggle="tab" href="#Recent">Recent</a></li>
      <li><a data-toggle="tab" href="#Past">Past</a></li>
      <li><a data-toggle="tab" href="#UpComing">UpComing</a></li>
 </ul>

<div class="tab-content">

 <div id="Recent" class="tab-pane fade in active">
   <h3>Recent Books</h3>
   <p>Some content.</p>
 </div>

 <div id="Past" class="tab-pane fade">
  <h3>Past Books</h3>
  <p>Some content in Past Books.</p>
 </div>

 <div id="UpComing" class="tab-pane fade">
  <h3>UpComing books</h3>
  <p>Some content in UpComing books.</p>
 </div>

</div>

我需要 Bootstrap 中的 Tabs 组件才能工作。

我该如何解决?

【问题讨论】:

    标签: javascript jquery twitter-bootstrap bootstrap-tabs


    【解决方案1】:

    看来您的代码 sn-p 工作正常。也许您可以再解释一下(并使用像 bootply 这样的网站,因为您的 localhost 无法访问)。

    查看您的代码 sn-p 在这里工作: http://www.bootply.com/Ny6q4guDgk

    【讨论】:

      猜你喜欢
      • 2016-07-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-19
      • 1970-01-01
      相关资源
      最近更新 更多