到目前为止,我有以下内容:
$("#main-link-bottom-about").mouseenter(function() {
$("#main-about-hover").slideDown("slow");
});
$("#main-about-hover, #main-link-bottom-about").mouseleave(function() {
$("#main-about-hover").slideUp("slow");
});
当您将鼠标悬停在链接上时,这基本上是一个下拉菜单。我想要实现的是,当您将鼠标悬停在上方时#main-link-bottom-about
,#main-about-hover
鼠标离开时会向上滑动#main-about-hover
,#main-link-bottom-about
.
但是,问题是,如果鼠标离开,会#main-about-hover
向上滑动,因为我不希望这种情况发生。#main-link-bottom-about
#main-about-hover
是否可以添加此异常,或者我是否以错误的方式进行此操作?
编辑::
HTML:
<!-- Navigation Links Bottom -->
<div id="main-links-bottom" class="shadow">
<a href="index.php" id="main-link-bottom-about" class="main-infotext-bottom">About</a>
<a href="#" class="main-infotext-bottom">Information</a>
<a href="#" class="main-infotext-bottom">Services</a>
<a href="#" class="main-infotext-bottom">Support</a>
<a href="#" class="main-infotext-bottom">Careers</a>
<a href="#" class="main-infotext-bottom">Mobile Site</a>
<a href="#" class="main-infotext-bottom">Site Map</a>
<a href="#" class="main-infotext-bottom" onclick="alert('Coming Soon!')">Mobile App</a>
<div id="main-links-bottom-hover">
<div id="main-about-hover">
<div id="main-about-div">
<li id="lnk1" class="about-lnk"><a href="#">Contact</a></li>
<li id="lnk2" class="about-lnk"><a href="#">Technology</a></li>
<li id="lnk3" class="about-lnk"><a href="#">Coverage</a></li>
<li id="lnk4" class="about-lnk"><a href="#">Environment</a></li>
<li id="lnk5" class="about-lnk"><a href="#">T&C's</a></li>
<li id="lnk6" class="about-lnk"><a href="#">Refund Policy</a></li>
</div>
</div>
</div>
</div>