0
Hi朋友只有在其父母被徘徊時試圖顯示子菜單下拉列表,但其父母被自動懸停時顯示。這裏是代碼..在父引導欄上懸停時顯示導航欄中的子菜單下拉菜單
<nav class="navbar navbar-default">
<div class="container">
<ul class="nav navbar-nav">
<li class="dropdown">
<a class="dropdown-toggle disabled" data-toggle="dropdown" href="https://www.drona.in/current-affairs/">GOVT JOBS</a>
<li class="dropdown-submenu">
<a class="test" data-toggle="dropdown" tabindex="-1" href="#">New
dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a tabindex="-1" href="#">2nd level dropdown</a></li>
<li><a tabindex="-1" href="#">2nd level dropdown</a></li>
</ul>
</li>
</ul>
</div>
</nav>
這裏是JS
$(function(){
$(".dropdown").hover(
function() {
$('.dropdown-menu', this).stop(true, true).fadeIn("fast");
$(this).toggleClass('open');
$('b', this).toggleClass("caret caret-up");
},
function() {
$('.dropdown-menu', this).stop(true, true).fadeOut("fast");
$(this).toggleClass('open');
$('b', this).toggleClass("caret caret-up");
});
其實2級下拉應該打開時,我徘徊在新的下拉列表中,但其開放的時候我hvering在官立工作
可以通過我的JavaScript改變任何東西,因爲我需要改變我的整個代碼,並在用引導 –