0

I have created a drop down menu that I have used on many sites. For some reason in this application (http://quaker.wpengine.com/) the menu flickers and is mispositioned in both Firefox and IE8-10. It works fine in Chrome and Safari. Any idea why this might be happening? I think it is a CSS issue, but can't figure it out for the life of me.

Thanks for the help!

Here is the JS I am using on the menu:

//Add necessary classes to navigation
$('ul.level-1 > li > ul').addClass('level-2');
$('ul.level-1 ul > li ul').addClass('level-3');
$('li:has(> ul)').addClass('has-subnav');

// Mobile Navigation
$('body').addClass('js');
var $menu = $('#menu'),
$menulink = $('.menu-link'),
$menuTrigger = $('.has-subnav > a');

$menulink.click(function(e) {
    //e.preventDefault();
    $menulink.toggleClass('active');
    $menu.toggleClass('active');
});

$menuTrigger.click(function(e) {
    if ( $(window).width() < 768) {
       e.preventDefault();
    }       

    var $this = $(this);
    $this.toggleClass('active').next('ul').toggleClass('active');
}); 

//Remove active class on desktop version
$('ul.level-1 > li').hover(
    function () {
        $('ul.level-1 > li').removeClass('active');
        var $this = $(this);
        if( $this.children('ul.level-2').css('display') != 'none' )  { 
            $this.addClass('active');
        } else {
            $this.removeClass('active');
        }
    },
    function () {
        var $this = $(this);
        if( $this.children('ul.level-2').css('display') != 'none' )  { 
            $this.addClass('active');
        } else {
            $this.removeClass('active');
        }
    }
);
4

1 回答 1

1

我弄清楚了问题所在。我有一行杂散的 CSS 代码,不知何故被添加并说当您将鼠标悬停a在导航中的属性上时应用某些样式。这些带有li悬停样式/JS 的样式发生冲突并导致一些问题。我删除了 CSS 行,我们都很好!

于 2013-05-26T18:49:54.663 回答