我正在尝试将easytabs jquery与Twitter Bootstrap 3一起使用。问题是当我尝试调整它时,当我点击它时,导航栏切换不再有效,没有任何内容出现。知道为什么吗?
这是我的html结构:
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<h1><a class="navbar-brand" href="#">Bach Wigs</a></h1>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="tabContainer">
<ul class="nav navbar-nav navbar-right">
<li class='active'><a href="#salon">Salon</a></li>
<li class="dropdown">
<a href="#services" class="dropdown-toggle" data-toggle="dropdown">Services <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#hairCare">Hair Care</a></li>
<li><a href="#hairExtensions">Hair Extensions</a></li>
<li><a href="#hairColor">Hair Color</a></li>
<!-- <li class="divider"></li> -->
</ul>
</li>
<li><a href="#location">Location</a></li>
<li><a href="#contact">Contact Us</a></li>
</ul>
<section class="body">
<div id="salon">
<div class='salon-title center-block'>
<img src="img/LogoPNG2.png" alt="logo" class='center-block'>
</div>
<div class='salon-description center-block'>
<h3>Bach Wigs</h3>
<p>We provide top quality in all our services color, cut, style, extensions, wigs and much more.</p>
<p> Our newly remodeled salon established, December, 2012 services the finest clientele in the Metroplex, the United States and several countries around the world.</p>
</div>
</div>
<div id="services">
<div class='salon-title center-block'>
<img src="img/LogoPNG2.png" alt="logo" class='center-block'>
</div>
<div class='salon-description center-block'>
<h3>Bach Wigs</h3>
<p>We provide top quality in all our services color, cut, style, extensions, wigs and much more.</p>
<p> Our newly remodeled salon established, December, 2012 services the finest clientele in the Metroplex, the United States and several countries around the world.</p>
</div>
</div>
</section>
</div><!-- /.navbar-collapse -->
</div><!-- /.container -->
</nav>
当我尝试使用easytabs时,这里是javascript代码:
$(document).ready( function() {
$('#tabContainer').easytabs({
transitionIn: 'fadeIn',
transitionOut: 'fadeOut',
animationSpeed: 'slow'
});
});
更新
我将tabContainer
更改回bs-example-navbar-collapse-1
并创建了另一个div来放置easytabs jquery的标签ID。现在的问题是身体内容在响应时也会被隐藏。我知道这是因为订单,我找到了解决这个问题的方法。希望你也能提出一些想法。谢谢!
如果您愿意,可以查看网站本身。 http://webguy.moe/hair