【发布时间】: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