我確實有兩個引導路徑導航欄,其中我想通過單個切換按鈕在移動視圖中將兩個列表項摺疊成單個ul。具有單一切換按鈕的雙引導導航欄
任何幫助將是偉大的。
<nav class="navbar nav1">
<div class="container">
<div class="navbar-header">
<!-- <button type="button" class="navbar-toggle toggle1" data-toggle="collapse" data-target="#myNavbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button> -->
<!-- <a class="navbar-brand" href="#">WebSiteName</a> -->
</div>
<div class="collapse navbar-collapse" id="myNavbar">
<ul class="nav navbar-nav navbar-right top-nv text-uppercase">
<li><a href="#">About US</a></li>
<li><a href="#">Careers</a></li>
<li><a href="#">Group Site</a></li>
<li><a href="#">Contact Us</a></li>
<li><a href="#"><i>Client Login</i></a></li>
</ul>
</div>
</div>
</nav>
<!----------- ------------->
<div class="navbar navbar-inverse nav2" role="navigation">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="#"><img src="images/home/logo.png" alt="LOGO"></a>
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar2">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
</div>
<div class="collapse navbar-collapse" id="myNavbar2">
<ul class="nav navbar-nav pull-right cust-nav text-uppercase ">
<li><a href="#">Wealth management</a></li>
<li><a href="#">Multi manager</a></li>
<li><a href="#">Asset manager</a></li>
<li><a href="#">International</a></li>
<li><a href="#">News & Insights</a></li>
<div class="hd hidden-md"></div>
</ul>
</div>
</div>
</div>
我試圖is.The問題劇本是我不能給它附加到其他UL和如何打破foreach循環。
$(document).ready(function(){
if ($(window).width() < 960){
alert();
$(".navbar-toggle").click(function() {
$(".navbar-nav.top-nv").each(function(){
alert(2);
$(".hd").append('<li>'+$(this).text()+'<br>'+'</li>').css({"color":"red","display":"block"});
});
$(".navbar-nav.top-nv").remove();
//$(".two").append($("ul.two"));
});
}
});