嗨,我在下拉导航菜单上使用 mouseleave(),这样当用户离开子菜单下拉菜单时,子菜单就会消失,但是它似乎忽略了它并且菜单仍然存在。有任何想法吗?这是网站和代码:
http://www.maiagifts.co.uk/about-us/info_1.html
    $(document).ready(function() {
    $('#newcats li').addClass('parentitem');
    $('.newsubs li').removeClass('parentitem');
    $('.newsubs').hide();                      
    $('.parentitem').hover(              
    function(){
    $(this).children('.newsubs').show();
    $(this).siblings('.parentitem').children('.newsubs').hide();
 });
    //problem is here//
    $('.newsubs').mouseleave(
    function(){
    $(this).hide();
    });
    //problem is here//
    });