单击导航栏菜单时,选项卡窗格处于活动状态

时间:2017-08-22 13:21:50

标签: javascript css twitter-bootstrap-3 tabs

我有这样的Navbar菜单和标签窗格引导程序。

FAILURE: Build failed with an exception.
15:10:00.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
15:10:00.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
15:10:00.614 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] tried to access class com.google.common.collect.Sets$SetFromMap from class com.google.common.collect.Sets
15:10:00.615 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
15:10:00.615 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Exception is:
15:10:00.630 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] java.lang.IllegalAccessError: tried to access class com.google.common.collect.Sets$SetFromMap from class com.google.common.collect.Sets
15:10:00.630 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.google.common.collect.Sets.newSetFromMap(Sets.java:516)
15:10:00.630 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at com.google.common.collect.Sets.newIdentityHashSet(Sets.java:396)
15:10:00.630 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.<init>(DefaultTaskExecutionPlan.java:104)
15:10:00.631 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]   at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.<init>(DefaultTaskGraphExecuter.java:87)
15:10:00.631 [ERROR]

当我点击选项卡窗格时,域名将会改变 / home#dashboard或/ home#task

但是当我单击导航栏中的下拉菜单时,选项卡活动窗格将消失,并且没有活动的选项卡窗格。虽然我仍然想看到活动标签窗格的内容。我确实知道单击下拉列表时使标签活动窗格消失的<nav class="navbar navbar-default"> <div class="container-fluid"> <ul class="nav navbar-nav navbar-right"> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" href=""><?php echo $surname; ?> <span class="glyphicon glyphicon-user"></span> <span class="caret"></span></a> <ul class="dropdown-menu"> <li><a href=""><span class="glyphicon glyphicon-user"></span> Profile</a></li> <li><a href=""><span class="fa fa-unlock"></span> Change Password</a></li> <li><a href="">Page 1-3</a></li> </ul> </li> <li><a href="<?php echo base_url('logout'); ?>"><span class="glyphicon glyphicon-log-in"></span> Logout</a></li> </ul> </div> </nav> <ul class="nav nav-tabs"> <li class="active"><a data-toggle="tab" href="#home">Home</a></li> <li><a data-toggle="tab" href="#menu1">Menu 1</a></li> <li><a data-toggle="tab" href="#menu2">Menu 2</a></li> </ul> <div class="tab-content"> <div id="home" class="tab-pane fade in active"> <h3>HOME</h3> <p>Some content.</p> </div> <div id="menu1" class="tab-pane fade"> <h3>Menu 1</h3> <p>Some content in menu 1.</p> </div> <div id="menu2" class="tab-pane fade"> <h3>Menu 2</h3> <p>Some content in menu 2.</p> </div> </div> 。 如何修复此问题以防止点击的dropdwon菜单导航栏不会更改活动标签窗格?

欢迎参考,谢谢

使用href元素

enter image description here

使用按钮元素 enter image description here

&#13;
&#13;
<a href="#">
&#13;
&#13;
&#13;

0 个答案:

没有答案