0

考虑我的 HTML

<div class="abu">
<div id="pfabricsmenu1" class="box_conti_homepage">
<h2 class="tel_title"><a rel="dropmenu1" href="/new_site/?page_id=127">Telecommunications</a><br />
<img title="Telecommunications" src="wp-content/uploads/2011/03/box_image.jpg" alt="Telecommunications" width="191" height="76" />
</h2>

<div id="dropmenu1" class="box_text_homepage">
<ul>
    <li><a href="/new_site/?page_id=174">Business Telephone Systems</a></li>
    <li><a href="/new_site/?page_id=66">Hosted IP Telephony</a></li>
    <li><a href="/new_site/?page_id=67">Fixed Line Telecoms Management</a></li>
    <li><a href="/new_site/?page_id=83">Mobile Telecoms Management</a></li>
    <li><a href="/new_site/?page_id=85">Inbound Call management</a></li>
    <li><a href="/new_site/?page_id=70">Telephone Support Services</a></li>
</ul>
</div>
</div>
<div class="mou">Getting the best from your telecoms with the latest technology to suit your business.</div>
</div>

我想悬停在鼠标悬停时<h2>向下div.box_text_homepage滑动,鼠标悬停时向上滑动。我的问题是即使鼠标悬停菜单也会向后滑动div.box_text_homepage,我该如何阻止它?

       $('.box_title_bar_homepage .abu').each(function(){

        var $maindiv = this;

        $(this).find('h2').hoverIntent(function(){
            $($maindiv).find('.box_text_homepage').slideDown();
        },function(){
            $($maindiv).find('.box_text_homepage').slideUp();
        })

   })
4

2 回答 2

0

为什么不这样:

$("#dropmenu1").hover(function(){
        $(this).children().slideDown();
    },function(){
        $(this).children().slideUp();
});
于 2011-04-18T19:08:45.863 回答
0

试试这个:

    $('.box_text_homepage').hover(function(){
        $(this).slideDown();
    },function(){
        $(this).slideUp();
    })
于 2011-04-18T19:11:40.993 回答